Grasshopper

algorithmic modeling for Rhino

Hello,

I must say I'm very new to grasshopper. I am wondering if there is a grasshopper definition similar to the Circle packing plugin for rhino.
I am trying to create a circle packing where the larger circles are in the center and the smaller ones furthest away from the center.
I would like to know if there is a possibility to control the size of the circle.

Could someone help me how to do it?

Thank you

P.

Views: 10199

Replies to This Discussion

Hi, do you want to arrange the circles in a regular pattern or randomly?

Hey Artyom,

Thanks for your reply! I would like to arrange the circles in a random pattern, very similar to the rhino plugin its just I have been browsing through the forum and internet and I don't seem to find examples that can show me how I can get to this result. What I want to achieve is just a pattern of circles where the bigger circles are in the center and the smallest further away, and by doing so being able to control the maximum and the minimum size of the circle.

Cheers,

P.

Hey Again, 

This is what I can get with the plugin, what I wish to achieve is the reverse of this circle organization. I hope this can help understand what I'm trying to achieve

Cheers,

P.

Attachments:

I've used Kangaroo to do something similar. You can see it hopefully in the video embedded below. I would just swap out the random radii circles that I used for circles that have larger radii the closer they are to the center of the grid. I'll try to look up the old definition and see if I can get it to work on a newer version of Kangaroo and Grasshopper.

Hey Andrew,

This is great! This can be very helpful for me to start with! Would you be able to share the script with me?

Cheers,

P.

Hey,

I am more interested in the beginning part of the script, if that is possible?

Cheers,

P.

Here are the files. Note: 

1. It is not perfect and the circles sometimes overlap. Ask Daniel Piker about this as I can't figure it out. It has to do with the stiffness values of the springs. At around 5000 stiffness it usually works quite well but some overlap. If you put it much higher than 5000, it freaks out and explodes.

2. In order to make the spring network, it must create a spring between every circle and every other circle. This is a lot of springs. With 121 initial points, you have 7260 springs! On my old laptop, anything more than 200 points runs very slow.

3. You can swap between random and gradient radii with the toggle. See the note about swapping between large radii in center vs small radii at center.

Random Radii Start

Random Radii End

Large Radii at Center Start

Large Radii at Center End

Small Radii at Center Start

Small Radii at Center End

Attachments:

Hello Andrew,

you wrote: 

 In order to make the spring network, it must create a spring between every circle and every other circle.

 

Wouldn't it work if create springs only between the nearest circles (probably just filter them by distance from each other)?

Thanks.

 

Yes, I think so. This would be a good optimization. However, depending on the situation, you might not know if two circles that start out near each other would end up near each other in the end. Feel free to give it a try.

Hey Artyom,

Could you show me how to do that?

Cheers,

P.

Sure, its actually very easy, you just have to use the 2d proximity node in that part of the definition where all the points are connected to each other.
i'll try to post the definition a bit later.

Hey Andrew,

Many thanks for this! This is extremely helpful! I can generate many variations its really what I was going after!

Cheers,

P.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2021   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service