Message Boards Message Boards


Ellipse Packing Via Hierarchical Optimization

Posted 6 years ago
8 Replies
17 Total Likes

Packing ellipses into a circumscribing circle is more complex than packing circles, since there is no formula for the minimum distance between two ellipses or the maximum distance from the center of the circumscribing circle to an ellipse. This is overcome by embedding constraints using Lagrange multipliers into the problem to locate the most distant point from the origin of an ellipse and the points on pairs of ellipses closest to each other. A result of a packing, showing the ellipses and the determined points is shown here:

enter image description here

The complete calculation is in the attached notebook. The optimization was carried out as a local search using MathOptimizer Professional

as FindMinimum does not converge for the calculation.

8 Replies

20 ellipses takes about 6 minutes, using a Mathematica interface to the COIN-OR local solver Ipopt.

enter image description here

latest results for packing ellipses into circles. the calculation for the attached plot took about 12 seconds.

enter image description here

I've developed a slightly simpler method for packing ellipses in a circle. For preventing ellipse overlap, the point on one ellipse which minimizes the equation of the second ellipse is found. Here's an example: enter image description here

I've discovered that my approach for packing ellipses into an ellipse does not work for all situations.enter image description here

The notebook showing the packing of three ellipses into the circumscribing ellipse is attached. Pairs of closest points on all pairs of ellipses were determined using embedded Lagrange multiplier equations and then the values of the ellipse equations for the nearest points on the other ellipses were used to ensure no overlap.


I can now pack 3 ellipses into an ellipse. Details to followenter image description here

Now that the basic approach has been worked out, I'm going to add more ellipses and also replace the circumscribing circle with an ellipse. For packing arbitrary ellipses, the trivial solution is to have one large circle and make the other ellipses very small, so more specification is needed.

The hard part of the magic trick is done well here, but not the easy part.

The easy part -- select three arbitrary ellipses. What is the best packing for those three arbitrary ellipses?

If the ellipses aren't arbitrary -- if you have a circle and some random points of tangency, then it's pretty easy to find non-arbitrary ellipses that pack well based on those points.

How many arbitrary ellipses can your program pack?

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract