Evaluating the curve in more of a geometric matter just requires switching out the Evaluate Curve for the Evaluate Length component (forgot about that one), and disconnecting the curve domain from the random component....the Evaluate length component will default to evaluating the curve between 0 and 1, so the standard output of the random component is fine
http://grasshopper3d.googlegroups.com/web/rndCrvDivLen.jpg?hl=en&gsc=Nc2MCyEAAADR2qZhzSmBiYeNU-7r56L23Bh1hUS7Bhd_AbpI9SssvkzfKN-m9S9niuHrq-IEXAE -Damien On Jan 15, 11:26 pm, damien_alomar <[email protected]> wrote: > Domains are equivalent to the mathematical "length" of the curve. > There's a start parameter and an end parameter value and any values in > between those two can be solved through the mathematical equations and > the control points that dictate the final shape of the curve. The > three key things to understand are that the domain does not really > relate to the length of the curve at all (although by default when > Rhino creates curves it does its best to try and match the domain to > the length), the domain of the curve can be reexpressed (ie changed > from 0 to 1), and lastly that evenly spaced values in parametric space > will not be evenly placed in terms of distance along the curve. > > So far the suggested solutions are really over complicating this > problem. Right now you guys aren't using the random component as its > intended and are thinking of crazy ways to get around it. Random > number generators will only generate numbers from 0 to 1, so if you > look at the R node you'll find that the random component can except a > range and defaults to that 0 to 1 range. Ideally we want to use the > domain of our curve to set the range of our random number set. There > use to be an explicit Curve Domain component in grasshopper, but it > was taken out because David has added the implicit conversions almost > everywhere in GH. An implicit conversion is simple the concept that I > can feed one data type (a curve for instance) into another data type > (a range/domain for instance) and that data type is able to be > extracted from another, the it will do so automatically. Because of > this, we can just feed our curve directly into the R node and we'll > get the domain that is need...no dotNet scripts. After that just feed > that to the Curve Parameter component and you're on your way. > > http://grasshopper3d.googlegroups.com/web/rndCrvDiv.jpg?hl=en&gsc=Ql9... > > The only thing about this solution is that you'll get a higher > concentration of points, geometrically speaking, where the parametric > space of the curve is more compressed. This kind of makes the > randomness jaded, but probably doesn't matter that much. I'll see if > there's a way to randomly divide the curve more based on geometric > space than parametric. > > HTH, > Damien > > On Jan 15, 8:31 pm, visose <[email protected]> wrote: > > > I'll leave that to David. He's a man of much more knowledge. He will > > probably have to end up correcting me any way. > > :P > > > On Jan 16, 1:42 am, Chris Wilkins <[email protected]> wrote: > > > > Visose, > > > > That worked. You are a man of much knowledge. > > > > Can you explain the "reparameterize" and the "domain" of the curves > > > any further? > > > > Thanks much, > > > Chris > > > > On Jan 15, 7:29 pm, visose <[email protected]> wrote: > > > > > Right-click on the curve component and check 'reparametrize'. It > > > > should normalize the domain range from 0 to 1. > > > > > On Jan 16, 1:22 am, Chris Wilkins <[email protected]> wrote: > > > > > > Baldino, > > > > > > I tried building your solution (since I hadn't used the Random > > > > > component yet), and found a problem when there are more than 3 control > > > > > points on the curve. I found that the domain of the curve rises when > > > > > more control points are there, and the Evaluate Point on Curve > > > > > component would only divide a portion of the curves. Here's a pic of > > > > > that: > > > > > >http://groups.google.com/group/grasshopper3d/web/RandomDivideVB1.jpg > > > > > (I crossreferenced the input in the last component to show the five > > > > > curves with same random values) > > > > > > The domains are listed under each curve and you can see how the > > > > > affected portion is shorter when the domain rises over 1. > > > > > > I couldn't find a GH component that output the number of control > > > > > points, so I tried out the VB component (finally). I got the domain of > > > > > the curve that way and multiplied the random numbers by the domain to > > > > > divide the whole length of the curve. Here's the two additional > > > > > components: > > > > > >http://groups.google.com/group/grasshopper3d/web/RandomDivideVB2.jpg > > > > > (I could only make it do one curve at a time without more thought). > > > > > > Chris > > > > > > PS. I have no idea if changing the degree of the curve will mess this > > > > > solution up. I had no idea what "domain" of curve was before this. > > > > > > On Jan 15, 12:37 pm, baldino <[email protected]> wrote: > > > > > > > this will > > > > > > work:http://groups.google.com/group/grasshopper3d/web/divide_crv_randomlen... > > > > > > > On Jan 15, 6:15 pm, Alvin <[email protected]> wrote: > > > > > > > > Hi, > > > > > > > > I'm just getting into Grasshopper and need some initial help. > > > > > > > > I would like to divide a curve into a certain # of segments, with > > > > > > > each > > > > > > > segment being a random length. I cant see how to any of the > > > > > > > functions > > > > > > > in the curve>division section of grasshopper can do this. Little > > > > > > > help > > > > > > > please? > > > > > > > > thanks much, > > > > > > > > Alvin- Hide quoted text - > > > > > > > - Show quoted text -- Hide quoted text - > > > > > - Show quoted text -
