I recently needed a solution to packing ellipses. The radii and orientation are dependant on the position of the ellipse.
Within the time I had, the only usable option I found was brute forcing my way through it the following way:
- Test for collision and move colliding shapes appart.
- Move all shapes towards the center by small amount
I’ve attached a gh file that’s cut down as much as possible (uses stuff from Pufferfish and Anemone). There are a few things in there on top of the above steps. Mainly 1. the center points are sorted randomly as collision many/many only outputs one colliding shape 2. the amount that ellipses are pushed are reduced over time.
I’m curious to know if there are different solutions to ellipse packing and if there are faster ways to the brute force approach I used.
bfep_01.gh (35.9 KB)