Grasshopper

algorithmic modeling for Rhino

Hi,

Classic newbie question: I want to generate a point grid with a random z-direction position for each point. Grasshopper generates a series of random numbers per point rather than a single one. I tried random reduce and culling but stil end up with a single same values for all points. ANy suggestions? I am using the x,y,z point function and feeding a series of values into it for the x and y positions.

Views: 4053

Replies to This Discussion

Is this what you want to achieve?? try to change the seed number in each random number generator..

Regards M. 

Hi Marios,

It's getting better in that at least the rows are individually randomised. The issue lies with the grid length function. The list length function retrieves 6 as the value of the list length (assume 6 x6 grid), hence the rows of 6 identical random values. It seems to me that the list should be 6x6 but this does not work in the right way. I would still like to have each of the values in the entire grid at a single individual random value. How do I get around this? I tried longest list, cross referencing etc.

Attachments:

two concepts you need to understand:

1) Random returns a repeatable "random" sequence of numbers. The Sequence changes with different "Seed" values.

2) List/Tree logic in GH. There's a list of points for each row in the grid. Each row needs to get its own list of random values. Right now you create only one list, that gets applied to each row.

Input a list of [number of rows] seeds into the Random component. Graft this input so every Seed greates its own list of values.

You just need to flatten the P output.

 

Also, I recommend you enable "draw fancy wires" under the view menu.

I second that (enabling fancy wires). You can either flatten the point-list from the beginning as Vicente suggests, or following my screenshot by flattening the z output and then "re-grafting" it. you can flatten/graft either by component or by right-clicking on the input symbol. 

Superb. Thank you for all the generous advice.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service