algorithmic modeling for Rhino
Can someone please help me resolve Grasshopper destination for the following required out.
1.Line
2.Divide line (odd/even divisions)
3.Move points in series along z-axis but from the center.. such that the center point (in case of even) is displaced max as compared to the rest.
4.On changing the the divisions of the line (odd/even division) the out of moved points should be as shown.
Tags:
There's probably a more elegant way to do this, but I tested for even or odd and divided the number of points by 2. If odd, for example 5 points (0, 1, 2, 3, 4), you'll get 2.5, round down to get the middle index, and choose that point with List Item. If even, for example 4 points (0, 1, 2, 3), you'll get 2, so subtract one and choose those two indices, 1 and 2. I only had a few minutes to play with this, so it isn't a fully-baked solution, but it should take you a little further.
Thank You. So Much.Works just Great.
Wonderfully Done. Thank you So Much
Take the list length and divide by 2.
Round the number and use the "Ceiling". On the round component that's the C
Build a series or a Range based on that number then reverse it and merge them into one
Use the "Delete Consecutive" component so you have one that it doubled up in the middle and one that isn't.
Plug in the two lists (one with consecutives deleted, one with repeats) into a stream gate and use a modulus-2 of the original list length to pick which gate. 0 for even 1 for odd
Thank You. Andy
I am New to GH.
Will look at the definition,
It's a nice approach but just be wary of the stream filter not lending itself to multiple gate numbers. e.g. if you had two curves, one odd, one even, the filter wouldn't work.
I am looking for only one curve for an example i am working on.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by