Circle packing help

Hello! 2nd time posting here, I am extremely inexperienced with grasshopper.

I am using a circle mapping script that I found in the comments of someone else’s question (not sure if I need to credit the original poster here?) And it almost does exactly what I want but I am running into a few issues

I am trying to map circles onto a dome that has a diameter of ~52"
The circles need to have a diameter of 3.5" and not overlap. It is ok if there are some gaps. I have included an image of the script and the results it is giving me.

I am not sure why some of the circles are clustered inside the dome. I have tried playing around with the radius and “B” values but have not had much luck. Maybe there is an easier way to do this, but this is the only script I have found that has come close to working


attach your gh file so people don’t have to redo the work and include ‘internalized’ brep

Just in case, potentially helpful:

Here is the GH script I have tried using:
K24Circles.gh (35.6 KB)

just attached the correct file! I attached the wrong one earlier because I was using my phone!

Here is a solution using Kangaroo. It’s a bit iterative, so you may want to change the random seed and number of circles to see what you can get out of it. The most 3.5" radius circles I got was 394. @DanielPiker may know a better method to constraining the points to a hemisphere.

grasshopper forum.gh (20.0 KB)

1 Like

Yes, when the shape is part of a sphere, we can improve efficiency and accuracy by using a simpler distance constraint instead of keeping points on a mesh(where you always have to trade-off between accuracy and speed):


circledome.gh (19.6 KB)

This includes a Grab component so you can move the circles around in the viewport if you want to nudge it into a better packing.