Grasshopper

algorithmic modeling for Rhino

Hello, I already asked in the rhino Newsgroup...

http://discourse.mcneel.com/t/distribution-with-limited-randomness/...

but I thought maybe this is a more appropriate place to ask:

Hello Newsgroup,

I run into the following problem on a regular basis and haven't found a way to solve it 100% yet, maybe someone can help:

I would like to be able to randomly distribute a block / object over a 3D surface but with the possibility to specify a max and min value for the distance between the blocks (or their bounding boxes) this way we could avoid or limit the amount of the intersection of objects e.g. to spread trees over a landscape (please see attached picture)


Ideally I would also be able to specify a random z-axis rotation for the blocks and random scale effects with a specified min/ max setting for the instances, but since this already can be achieved by existing scripts e.g. harmony this would be just for convenience...

I would be very thankfull for any help here.

best regards

Andreas

Views: 4758

Replies to This Discussion

...anyone? I would even pay for such a tool... maybe it could be archived with something like circle packing (with different sized circles), then extract the circles centers, project these to the surface and replace them with the random z-axis rotated blocks?

Sadly this is beyond my limited abilities in grasshopper...

thank you for any feedback

Andreas

Hello Andreas

i gave it a go and i believe this is similar to what you are after (there is not precise control of min max distances of the trees, but collisions are avoided according to min max tree sizes)

i have attached the definition to try it. tell me what you think. the orange wire in the last multiple curves intersection is a last check for cases of very close tree areas resulting in intersecting trees for each. randomizing the values could output such case (so not an orange wire anymore).

cheers

alex

Attachments:

Hello Alex,

thank you so much for your help!!!

I downloaded your definition, will test it asap and report here .

best regards

Andreas

Hello Alex,

I experimented a while with your definition and basically it works great and even exceeds my initial wish somehow, the feature of the randomized object clusters is great.

My problem is that due to my limited grasshopper experience I do not 100% understand all its components, my main problem is "how do I replace the red extrusions with my block definition?"

So in order to better understand your approach I cut it down to a random point distribution with a minimal proximity feature and placed my block definition at the resulting points (I used the "human" grasshopper plugin - http://www.food4rhino.com/project/human?etx  to place the blocks) so far that worked, but I did not succeed to put random scale / rotation to the block output yet... my gut feeling tells me that this should not be too hard to do...

I attached the definition - any ideas?

thanks again

Andreas 

Attachments:

hello andreas,

there are ways, but you have to reference the block inside grasshopper in order to have the definition scale rotate it etc. since i did not have any block to play with, i implemented the rotation earlier, which is not convenient in your case, but was done for demonstration purposes.

are these blocks 3d meshes? you can upload one here and i will give a go later.

some things to try until then, is to provide a range of rotation values (as many as your trees) to have the trees randomly rotated. same goes for the scale part.

another approach would be to keep my extrusion, scale them randomly, and box morph (search the forum for box morphing) the block to these distorted extrusions. (still you need to reference inside grasshopper the tree geometry).

you can try these and i can get back at this late evening.

cheers

alex

Hello Alex,

Sorry, I did not have the chance to upload the scene yesterday, attached please find the test scene, the blocks are indeed 3d meshes, I replaced the trees in the test file with dummies to make it a smaller file...

thanks for your effort!

best

Andreas

...here is the file ,,,

Attachments:

Hi Andreas and Alex, did you guys ever solve this? Would be amazing if you could share if you have?

Thanks
Paddy

You could achieve this with Grasshopper...

It would be good if you could post a file with your input geometry, i.e. surface to populate and a tree.

You could

1. Place points at random on the surface

2. Cull any points that are too close together.

3. Create XY Planes at the points

4. Rotate each plane by a random amount

5. Orient the tree geometry to the rotated planes.

6. Scale the trees by a random amount between 2 limits.

The tricky bit is culling the points so they are random but not too close together. I think you can do it using the ClosestPoints component and then culling based on distance.

If you post some geometry to work with you are more liekly to get a response on here!

EDIT: Once again, after replying to what looks like a new post with no replies all replies from ages ago appear! Anyone else ever have this happen on this forum???

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