Does anyone know how i could divide a segment in a specified number of sub-segments, so that they do have random lenghts but also have a min and max possible length?
Haven't tested this, but I'd try to make a random list of number in the min-max range. Then use the Mass Addition component to add them all together and then use the Eval Length component with the Partial Result output. This will give you parameters that you can use the Shatter the curve.
I thought of this, but doesn't really work.
Let's say You stop adding segments once the total length of the segment chain is past the lenght of the initial curve. You now want to make the result "chain" the same lenght as the inital curve.
You can either:
A) cut the surplus of the last segment, but it may result in a segment that might be shorter then the min acceptable value
B) scale the whole chain to the lenght of the inital curve, but if you had in the unscaled chain a segment that is at the minimum value, it will drop below this once you scale it down.
Weird problem, i thought of different stuff, but none actually does the job correctly.
i don't really get how this helps...
isn't it the same problem, that the sum of the segments (which have random lenghts within a domain) is not exacly the same as the length of the curve that i want to split?
Well, they wouldn't be random in this case, they'd be a sequence. You could generate a sequence like this with a GraphMapper for example. You just have to be careful that the shortest and longest segments are within your range.
interesting, but if i put the values through graph mapper, unless the graph is a diagonal, the sum of the output values won't be the same as the sum of the input values
1) create a line segment whose length matches the total length of the intervals you need.
2) divide this line segment into N sections using a [Evaluate Length] component and a range of numbers from 0 to 1
3) Feed the numbers through a GraphMapper, so the line division becomes irregular.
4) Extract each individual interval from the divided line, there's multiple ways of doing that, shatter for example, or using the division point coordinates directly.
5) Jitter the resulting intervals.
Hi Andrei
Maybe this is what you need. I would do it simpler but I took all the expressions out of the components to make it clearer. It takes a curve and divides it in N random length segments. With the sliders that define the domain of the random component you can control the randomness of the divisions... The thing I don't understand is: Why don't I get segments of equal length if I specify a regular sequence in the t value of the scatter component? Shouldn't it do that?
no, it shouldn't. Or at least, there's no guarantee it will. Special curve types like Lines, Polyline and arcs might give you constant parameter speed, but NurbsCurves will be more 'dense' in some areas than others. When a curve is more dense, a certain parameter interval will be shorter.
Curve parameters are not good substitutes for physical distance.
Allow me to demonstrate with a curve type you're probably very familiar with; the Sine curve:
The Sine wave is defined by a single Parameter (just like nurbs curves), except we usually call it "x" rather than "t", but there's really no difference. For every x, this curve gives you a value of y. Nurbs curves give you 3 values for every t (x, y & z), so they're a bit harder to wrap your head around, but the principle behind them is the same.
Let's take a look at two intervals along the Sine wave {A; B}, both of which have the same parameter length. Yet the length of the actual sine wave portions differs greatly, almost by a factor of 2. This is the exact same effect.
I always thought that the t value was a parametric evaluation of the length of the curve. Then 0 would be the start, 1 the end, and .5 the half of the length along the curve...
I looked around and now I understand that "t" is a variable that will drive the formulas for the X,Y and Z coordinates of the curve. So for a circle of radius 1, on the XY plane, centered at (0,0,0), "t" goes from 0 to 2PI and the formulas are X=1*cos(t), Y=1*sin(t) and Z=0.
Is that it?
The U and V coordinates of a point in a surface are similar to the "t" value or are they related to the lengths of the two dimensions of the surface?