Grasshopper

algorithmic modeling for Rhino

Hi,

i've created a 3d grid of points in rhino and i want to give it a  system so that i can have a systematic control over each point of the grid. 

For example a 4x4x4 grid.

i want to create a polyline that populates the grid in a forward/backward/left/right/up/down manner in other words only within the XYZ axis one point at a time (like a 3D hilbert curve). 

For instance the starting point is at 1,1,0 (XYZ).
to move one step right is to point 2,1,0 ,
to move one step forward is to point 1,2,0
and to move upwards is to point 1,1,1.

The attached file is what i'm working on right now.

What i tried doing was i selected all 64 points and decomposed them into their XYZ coordinates and then i sorted each one of them according to their axis. so i have 3 lists of the 64 points from their smallest number to the biggest. The bad thing about this is that i need to list out the XYZ coordinates for each of the 64 points and it is quite a pain because the grid i actually wanted is way bigger than this.

i thought a better way to do that would be to somehow number each point from 1-64.
Thus i could get a system where the starting point would be point 1, point 2 is the one next to it, point 17 is the one right directly above it and the last point being point 64.

So if i want the line to:
move right/left, i would just add/subtract one.
move forward i would just add 4 (going to the next row)
and move upwards/downwards i would add/substract 16.

How could i do this in grasshopper?
I hope i explained clear enough.

Any other method/suggestion is appreciated as well!


Views: 716

Attachments:

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service