algorithmic modeling for Rhino
Let me preface this by saying I know basically nothing about how trees and data structures work in Grasshopper (I'm basically still a beginner though I've been using it for over 1 year now). I also tried searching for a solution but I'm not even sure what terminology to search for.
I'm trying to create a pattern by selecting certain points out of a grid, to which I will then Orient some objects. The problem is I need the points to shift at each row.
The highlighted points are the ones I want to select, but I don't want to do it by flattening the list and using a List Item, because this breaks when the grid size is adjusted.
What I have been trying to do is use a combination of Shift List and List Item, but can't get it to work. Seems like from my research Relative Item might help, but I don't understand how that component works.
Also, if there is an easier method to select particular points from a list I'm open to that too. Thanks in advance.
Tags:
Tried it, not quite working right (i'm still using 9.0014, since I don't have Rhino 5). Would you also mind explaining how it works, in very layman's terms? I am an architecture student, and programming language makes my head hurt. Thank you.
The pattern is going the opposite direction, and starts getting funny towards the end.
you forgot to graft the series output.
Yes, I realized that, but it only fixed part of the problem.
Incidentally my file has a bug. It will not work as expected when the number of vertical points is not an exact multiple of the culling pattern length. I'll see if I can fix that.
The basic logic is as follows.
We have a grid which consists of a collection of columns, where each column consists of a list of points. You said flattening is out of the question, so we need to cull items from each list individually.
Let's say our culling pattern is KDDDKDD (repeat as needed). K = Keep, D = Ditch. If a column contains 18 points, the pattern needs to be repeated until it is 18 items long. In this case:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
K D D D K D D K D D D K D D K D D D
We can now cull each column, but they will all be culled in the same way. By shifting the pattern one more index for each column, we can cycle the culling.
The fix incidentally is to Shift the pattern PRIOR to repeating it. Then it works as expected:
--
David Rutten
david@mcneel.com
Tirol, Austria
hi david. if this pattern were not a straight line? like what im trying here.
http://www.grasshopper3d.com/forum/topics/sequencing-a-spiral?comme...
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
© 2024 Created by Scott Davidson. Powered by