Grasshopper

algorithmic modeling for Rhino

Hi, my first post here!

 

I am trying to make a bunch of random spheres from a set of randomly placed points. 

 

However, the radius of the sphere should be such that they will never intersect with the other spheres. So What I have done is:

 

1. creating a random set of points

 

2. use the 3D proximity to find the closest points

 

3. some how measure the distance of these vectors created from step 2

 

4. assign the values as radius for each sphere

 

 

I am stuck at step 3 now because I am confused about how exactly to use the outputs from the 3D proximity. Anyone knows how to use it please help!

 

 

By the way, I am working on this problem as the first approach to a flock or swarm behavior. Does anyone know if there had already been a solution to this? And where I could get it?

 

 

I really appreciate anyone that helps!

Views: 4324

Replies to This Discussion

You'll need to flatten the output of Proximity3D so that it matches the layout of your point data. 

This approach ensures that you never get intersecting circles, though it might limit them way too much for your taste...

 

 

 

 

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

 

Thanks so much David, I will give it a try and post the results. BTW, Grosshopper rocks!

one more question. what is that (a,b) -> (a) block in the middle? I can't seem to find it. 

 

Thanks!

Path Mapper.

 

Right-click on the component and check the help tab for syntax suggestions.

 

For what David posted you will have to enter {A;B} and {A}.  The curly brackets and the semi-colons matter for proper operation.

 

Thanks taz. this is what I did but it doesn't have any output from the path mapper...

 

I right clicked on the path mapper component. In the Map editor, under source I typed: {A;B} and under target I typed {A}. Did I do something wrong?

 

Thank you!!

Your placeholders need to correspond to the number of levels in the tree structure. 

 

Look at the path names in the panel (alternatively you could use the Param Viewer as David does) you'll see {0;0;0}, {0;0;1}, etc... 

 

Your tree structure has 3 levels, probably due to some other operation further upstream, thus you need 3 placeholders for a valid source mask.

 

{A;B;C} -> {A} will work.

WOW neat!! I was trying to find that Param Viewer.

 

This is how it looks now. How come it doesn't pack as tightly as what I expected for a sphere packing?

 

Thanks so much for the help taz

 

 

You can always double click on the GH canvas and search for a component by name.

 

As David said above...

"This approach ensures that you never get intersecting circles, though it might limit them way too much for your taste..."

 

Try changing the parameters (like the group number) to get a denser packing.

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