Circle Packing in a Triangle
Introduction
This application finds the best packing and largest radius of equal-sized circles, such that they fit in a pre-defined triangle.
One solution, as visualized by this application, is illustrated below.
This is a difficult global optimization problem and demands strong solvers. This application uses Maple's Global Optimization Toolbox.
Circle packing (and packing optimization in general) is characterized by a large optimization space and many constraints; for this application, 20 circles generates 310 constraint equations.
The number of circles can be increased to create an increasingly complex problem; Maple automatically generates the symbolic constraint. The vertices of the triangle can also be modified.
Applications like this are used to stress-test global optimizers.
Setup
Number of circles
Decision Variables and Optimization Bounds
The decision variables are the coordinates () of the centers of the circles, and their radius..
Search bounds for the decision variables
Vertices of the triangle
Constraints
No two equal-radius circles overlap if the distance between their origins is twice their radius
Distance squared from the origin of a circle to any of the lines of the triangle must be greater than the radius squared
The centre of each circle must be in the triangle.
Collect all constraints
Optimization and Results