Grasshopper

generative modeling for Rhino

# Problem with Random selection

Hello

I'm trying to select the circles from the image totaly randomly, and than extrude them in -random- heights.

I have no idea why is it happening like this. GH selects them in linear rythm. Maybe I shoudn't use "Random" component?

Views: 432

### Replies to This Discussion

try using random reduce component....that will work

best

m

Thanks

And how can I ranomise the height of the extruded (selected) circles?

Random reduce will work well, but you should probably still flatten the output of the "Circle". Right now the are branched in rows, so it will be hard to get it to look random.

The R Value of the random component, should be 0:X,

X=total number of circles (Length of flatten list coming out of "Circle")

The N value should be how many circles you want selected.

To extrude them randomly, plug "Item" into extrude curve; For the Extrusion Distance/Direction, plug in the direction you want (probably a Z vector), and then plug in a new "random" component into the vector (to create vectors with random magnitudes).

The random component should have the following values R= X:Y, X being the smallest extrusion you want, Y being the largest. N= number of circles that will be extrude (use list length).

That should be it.

Thank You ;)

I have one more question. I need to put this pattern on rectangle which dimensions will change. How to put the pattern to be flexible? I want to fill this rectangle with the grid and when wall changes dimensions the pattern would fit to new ones.

Change the Values for your TriGrid component.

Hello Kuba, Hope to be on time ;)

Attachments:

Gui Talarico I don't andestend one thing. How to use 0:X expression.  Put the list lenght of "circle". What is the meanig of dividing 0 number?

0:X is not an expression, it's a domain - for example, from 0 to 1.

0:1 is a domain that encompasses all number between 0 and 1.

The R value of Random components asks for a Domain. This tells the Random Component the range in which to generate all the random numbers.

To create a domain, use the "Domain" component.

• View All