simple point population with range of distance between points - Grasshopper2024-03-28T08:49:02Zhttps://www.grasshopper3d.com/forum/topics/simple-point-population-with-range-of-distance-between-points?commentId=2985220%3AComment%3A1754545&feed=yes&xn_auth=noThis is great, Thank you all…tag:www.grasshopper3d.com,2017-05-20:2985220:Comment:17548332017-05-20T15:00:18.778ZMichael DiCarlohttps://www.grasshopper3d.com/profile/MichaelDiCarlo
<p>This is great, Thank you all for your help. </p>
<p>This is great, Thank you all for your help. </p> Looping and recursion are two…tag:www.grasshopper3d.com,2017-05-20:2985220:Comment:17546802017-05-20T13:14:39.039ZJoseph Osterhttps://www.grasshopper3d.com/profile/JosephOster
<p>Looping and recursion are two different things... But you are right that a loop isn't needed. I had forgotten all about 'Evaluate Length'.</p>
<p>I would simplify your code further though:</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2769288408?profile=original" target="_self"><img class="align-full" src="http://storage.ning.com/topology/rest/1.0/file/get/2769288408?profile=RESIZE_1024x1024" width="721"></img></a></p>
<p>Just one little problem that I haven't got the patience to solve at the moment; using a circle (closed curve), the first interval appears to be…</p>
<p>Looping and recursion are two different things... But you are right that a loop isn't needed. I had forgotten all about 'Evaluate Length'.</p>
<p>I would simplify your code further though:</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2769288408?profile=original" target="_self"><img width="721" src="http://storage.ning.com/topology/rest/1.0/file/get/2769288408?profile=RESIZE_1024x1024" width="721" class="align-full"/></a></p>
<p>Just one little problem that I haven't got the patience to solve at the moment; using a circle (closed curve), the first interval appears to be doubled...?</p> There might be a more elegant…tag:www.grasshopper3d.com,2017-05-20:2985220:Comment:17545452017-05-20T05:34:36.427ZDaniel Christevhttps://www.grasshopper3d.com/profile/DanielChristev
<p>There might be a more elegant solution to this than recursion.</p>
<p></p>
<p>We generate random values between your two ranges,and then use the consecutive domains function to extract an increasingly larger distance with all our increments, (included a safe-guard to always calculate enough values by dividing the curve length by the smaller value of your fixed range, and then cull all units greater than the curve length), and then evaluate the curve at the given length…</p>
<p>There might be a more elegant solution to this than recursion.</p>
<p></p>
<p>We generate random values between your two ranges,and then use the consecutive domains function to extract an increasingly larger distance with all our increments, (included a safe-guard to always calculate enough values by dividing the curve length by the smaller value of your fixed range, and then cull all units greater than the curve length), and then evaluate the curve at the given length parameters.</p>
<p></p>
<p>The purple grouped part is only there to prove that all our distances fall within the given range.</p>
<p></p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2769288790?profile=original" target="_self"><img width="721" src="http://storage.ning.com/topology/rest/1.0/file/get/2769288790?profile=RESIZE_1024x1024" width="721" class="align-full"/></a></p> Take a look at this thread fr…tag:www.grasshopper3d.com,2017-05-19:2985220:Comment:17546222017-05-19T23:15:56.864ZJoseph Osterhttps://www.grasshopper3d.com/profile/JosephOster
<p>Take a look at this thread from last month:</p>
<p><strong>Randomly divide a closed curve</strong><br/><a href="http://www.grasshopper3d.com/forum/topics/randomly-divide-a-closed-curve" target="_blank">http://www.grasshopper3d.com/forum/topics/randomly-divide-a-closed-curve</a></p>
<p>The code I posted, using Anemone, works with curves, open or closed, including lines.</p>
<p>Take a look at this thread from last month:</p>
<p><strong>Randomly divide a closed curve</strong><br/><a href="http://www.grasshopper3d.com/forum/topics/randomly-divide-a-closed-curve" target="_blank">http://www.grasshopper3d.com/forum/topics/randomly-divide-a-closed-curve</a></p>
<p>The code I posted, using Anemone, works with curves, open or closed, including lines.</p>