algorithmic modeling for Rhino
Like this? It's not the most elegant...but it works fine. Just a series of split trees, dispatches and weaves. I'm doing it off of a surface, but you could make your grid of points any way you like.
Looking at it, it's actually mostly superfluous (in two of the path mappers, GH will figure out how to match the lists on its own), although the logic is really good to know for when you're doing a project that GH doesn't....
I can try to explain it quickly, although there's an excellent explanation of the path mapper here: http://www.grasshopper3d.com/forum/topics/path-mapper-help-1...
Basically, when you cut the surface into a grid, it automatically groups the points into "branches" that describe the columns of the grid. {0;0;x}, with "x" being the column number. Then, to create the interpolated curve that weaves between columns, you split out the even and odd columns. So you use the parameter viewer to extract the data tree info, dispatch that into two lists that have the 0,2,4,etc. on one side and 1,3,5 on the other. Then you points on those lists into two groups, so that you can select points with index 0,2,4,etc. from columns 0,2,4,etc. and weave them together with points with the index 1,3,5,etc. with the columns 1,3,5, etc. Here I use the path mapper to ensure that columns 1,3,5 will definitely weave with columns 0,2,4. So after I split the data into even and odd columns (or branches) and split each branch into even and odd point lists, my data structure looks like this {0;0;x;0}, with "x" still being the column index. My path mapper here matches the data in the odd list 1,3,5 so that it will also be 0,2,4 when I perform my weave of the points. To make 1,3,5 match 0,2,4 I execute the path mapper: {a;b;c;d} -> {a;b;c-1;d}. This takes data structure {0;0;1;0} and makes it {0;0;0;0}, so that GH knows for sure when I perform my weave which column it's grabbing from. Then you want the second column (column index 1) to ALSO weave with the third column (column index 2). So first I only take the list of even columns starting from the second one (I eliminate "0" from 0,2,4) with the split list, and then map my odd path to match up {a;b;d;c} -> {a;b;c+1;d}. Basically, the path mapper gives you the ability to make sure that your lists get matched correctly. Don't know if that helps...I think the path mapper discussion is much clearer, but hopefully this gets you started.
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