[Math] How many circles of a given radius can be packed into a given rectangular box

geometrypacking-problem

I've just came back from my Mathematics of Packing and Shipping lecture, and I've run into a problem I've been trying to figure out.

Let's say I have a rectangle of length $l$ and width $w$.

Is there a simple equation that can be used to show me how many circles of radius $r$ can be packed into the rectangle, in the optimal way? So that no circles overlap. ($r$ is less than both $l$ and $w$)

I'm rather in the dark as to what the optimum method of packing circles together in the least amount of space is, for a given shape.

An equation with a non-integer output is useful to me as long as the truncated (rounded down) value is the true answer.

(I'm not that interested in how the circles would be packed, as I am going to go into business and only want to know how much I can demand from the packers I hire to pack my product)

Best Answer

I had an answer before, but I looked into it a bit more and my answer was incorrect so I removed it. This link may be of interest: Circle Packing in a Square (wikipedia)

It was suggested by KennyTM that there may not be an optimal solution yet to this problem in general. Further digging into this has shown me that this is probably correct. Check out this page: Circle Packing - Best Known Packings. As you can see, solutions up to only 30 circles have been found and proven optimal. (Other higher numbers of circles have been proven optimal, but 31 hasn't)

Note that although problem defined on the wikipedia page and the other link is superficially different than the question asked here, the same fundamental question is being asked, which is "what is the most efficient way to pack circles in a square/rectangle container?".

...And it seems the answer is "we don't really know" :)

Related Question