Shape Packing Examples

Click on the pictures for higher resolution copies

Six Squares in a Circle

The 4 squares making the 'T' define the result, the other two squares have an element of freedom.

Five Circles in a Circle

Not much you can say about this one. The optimum solution is almost certainly having the five circles describe a regular pentagon.

Five Octagons in a Circle

Similar to the circle solution but with the added complexity that the octagons can pack slightly closer by lining up the sides. The octagons managed to pack into a circle of radius 2.60, compared to 2.71 for the circles.

Eight Squares in an Octagon

I was hoping for something more symmetrical, so I ran it again...

The second time produced the second image. It's slightly better, 2.9159 vs 2.9215. The limiting factor appears to be the three squares in a row at the top of the image. They are the same in both solutions while the rest of the arrangement appears to have some freedom.

The third attempt came up with a different arrangement. This one actually has a ratio of 2.9122, so it is about 0.3% better. Too close to call really.

Non of them are particularly symmetrical though.

The octagons don't line up because one of the degrees of freedom in the simulated annealing process is to rotate the container leaving the contents in place.

Six Circles in a Square

I think the arrangement shown is optimal. If you solve the maths the the ratio of the diagonal of the square to the diameter of the circles is (2 + 12/sqrt(13))/sqrt(2) which is about 3.7676. The applet's value in the image opposite is 3.7758.