Grasshopper

algorithmic modeling for Rhino

I'm struggling for a long time figuring out how to remap the index of a tree structure, I know grasshopper doesn't thinks with array structure but in tree structure, I still hasn't figured out the difference between two. For example if I had a 4 times 4 array.

array[0-3][0-3]

I used to write php, In order to switch the index, what I would do is:

for ( $x = 0; $x < 4; $x++) {
for ( $y = 0; $y < 4; $y++) {
newarray[x][y]=array[y][x];
}
}
I'm wondering how would I do this in grasshopper. Either by VB or by components.

I'm working on a array of lines, I want to loft them in both directions, attached is the screenshot.


Thanks a lot

Views: 2108

Attachments:

Replies to This Discussion

Try the Path Mapper - set your Source to be {0;0;A}(i) and set your Target to {0;0;i}(A). I think this will achieve what you're looking for.
Thanks so much for your quick reply, I'll look into it. I've never see that button before though.
it is exactly what I wanted, thank you so much.
Nice one! been looking for that for quite some time as well! transpose table, cool thing, thanks!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service