Grasshopper

algorithmic modeling for Rhino

Splitting a list of points into individual rows of points and running data through them simultaneously

Hi,

I am trying to divide up a sphere into points and alter each row of points by moving each individual point by a set amount. The set amount is defined by a list of data where each item in the list is used as the seed for the random generator to create a list of 'random' values to move that row of points by. I can do this one row at a time with the list item component, but I was wondering if there is a way to treat all the data at once like this?

Below is the definition so far using the list item component-

I want to treat all the rows on the sphere at once rather than just one at a time like below-

I have tried using series component with the list item, using sub lists and using split list component but i cant seem to get anything to work properly! Any help would be much appreciated

Cheers

Evan 

Views: 2167

Attachments:

Replies to This Discussion

Sure, its pretty easy, but you just need to handle the data correctly.

First you need to subtract 1 from the list length, because dividing a surface into 19 steps will generate 20 points, so you actually need to divide it into 18, so the list lengths match.

Also you need to use Flip Matrix, to have the points go by row and not column. Then its pretty much it.

Dont worry, it also took me a while to figure this stuff out when I was starting with Grasshopper.

Is this what you were after:

Attachments:

Oh yeah, and can I recommend that you switch to icon display for components and not the text. Its visually much easier to understand what component is what in screenshots and I find it far superior in working with Grasshopper as well. You can find it in Display > Draw Icons. Starting out I would even turn on Display > Draw Full Names. Makes it much easier to see what goes where.

Last thing, I would delete the last point and create a closed curve, that way you get the rings nice and smooth.

You do it like this:

This is how it looked before for comparison:

Also I would delete the first and last circle, since they are just a vertical line. I think you can figure out easily, how to do that easily with Cull Index ;)

Attachments:

Perfect, Thank you very much!

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service