Grasshopper

algorithmic modeling for Rhino

Populate a surface with 2 or more different objects (randomly)

Hey everyone,

 

I've been learning grasshopper for the past month now and am currently trying to make a grasshopper script that will do the following: I am trying to make a facade which has v shaped panels sticking out of the facade either facing up or facing down, in a random order. Basically, I know how to populate an object on a surface and give it say, a random thickness for each panel, but what I have not figured out how to do is how to make a surface, divide the surface, and then have all of the sub surfaces that have been created either contain a v shaped panel that faces up or faces down (in a random sequence)

 

Hopefully my explanation is clear... could someone point me in the direction of perhaps a tutorial on how to do this, or maybe a similar post to this request?

 

Thanks. Mat

Views: 4652

Replies to This Discussion

You need to create a random pattern of ones and zeros and then use something like the Weave component to create your source of geometry to place on the surfaces.

Attachments:

Hey Danny, that's great thanks!

I am wondering though, if it's perhaps possible to have more then 2 variables (currently up and down). Since the surface division is defined by 1's and 0's does that mean there can only be two different types of panels? How would I go about changing the script to allow for, let's say, 4 or 5 different panel types.

 

Also, is it possible to (while still keeping the randomized placement) allow for an inequal amount of the different types of panels? Let's say I have panel A, B, C, and D and I want panels A to populate 1/2 of the surface divisions, B to populate 1/4, C to populate 1/8, and D to populate 1/8. How could something like this be done?

Thanks!

Same principle really.

You just need to use a graph mapper to distort the distribution of the random numbers (domain of graph mapper Y is 0 to 3 ie A to D)

The weave component has an input manager on the context menu that allows you to add variables.

Attachments:

Danny,
I have a problem,
How can I extract the result of the distribution of panels "c", for example?
After oriented to separate into different layer.

Thanks!

Hi Danny, I have been trying to use your script to randomly scatter different types of geometries on a flat surface for a facade. 

However, when using the script, the geometries overlap a lot one with another (unlike the example you put above with A B C D) which works perfect.

Also, the whole area of the plane doesn't fill up fully , only a little.

Do you have an idea of what I might be doing wrong? 

Thanks really appreciate

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service