Variable size ellipse packing

hi all,

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:

  1. Test for collision and move colliding shapes appart.
  2. Move all shapes towards the center by small amount
  3. Repeat

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.

Thanks,
Bernd

bfep_01.gh (35.9 KB)

… this is just a 5 min draft/idea …
Curve-curve collision sounds good and precise, probably…

Ellipses are “tilted circles”.

So, another way could be still using simple sphere-collide solutions on curved surface/mesh:


ellipse_collide_V0.1.gh (16.9 KB)

Actual surface:

Surely far from good, but it’s an idea…

Surface local “steepness” would describe the ellipse aspect ratio (downhill diameter over perpendicular diameter) and maybe a grey-scale colouring of the mesh could define scale size factor.

PS I don’t really understand if this could be a good solution…

5 Likes