Image-based Circle Packing within a polygonal limit

Hi Everybody!

I’ve been researching about circle packing and now I am trying to put it in practice in a University architecture project.

I’m working with a script I took from two different forums I stumbled upon because I want to have a circle packed pattern through an image but within certain limits.

These are two posts by Daniel Piker’s I’ve found in this forum. Daniel if you see this post, please, help me! :stuck_out_tongue:

I used his script and tried to adapt it to an image based script but I now I can’t limit the circles inside my curve input (only the center points are inside i guess). I tried to use a collide button that was on Daniel’s script before but I can’t do it. Does anyone have the skills to do it?

Here is a screenshot of the script and geometry, the rhino file and the gh file.
Thank you in advance! (2.6 MB)
Image_based_circle_packing.3dm (251.2 KB)
Base image

If you want the radii of the circles to update as they move around the image, you’ll need a different goal.
Luckily there is now a component to do exactly this, including the option to prescribe a tangent boundary:

You can see also some further discussion about variations on this for if you want a compact circle packing where each gap is surrounded by 3 circles:


Thank you Daniel, you’re the man! Seriously, I really appreciate it, I still can’t believe you found this post eheh. This new feature simplifies everything!!
Only now my Solver isn’t working, It’s probably easy to solve, I guess I’m not so good at this… Is it missing something? I think I connected every thing right. (13.2 KB)
Image_circlepacking2.3dm (1.3 MB)

Okay I think I’ve got it, I moved the hole thing up the origin and it worked, thank you again Daniel!

1 Like

Can you help me understand that it doesn’t work in your definition in this post? (What have you moved the origin? … you can see the final definition GH,)
(* Also trying to learn the same process)
Thank you