Wednesday, November 09, 2016

[gpnoyhuv] Nice packings of circles in a rectangle

Consider the task of packing N circles (discs) into a rectangle.

Easiest is to arrange the circles in a rectangular array, factoring N = P*Q.  Pick the factorization that fits the rectangular area the best.

Rectangular array with incomplete last row.  There might be some choices about how many circles go in the last row versus the number of circles per row.  The last row can be centered for elegance.

Hexagonal close packing, with rows alternating P, P-1, P, P-1, ... and last row possibly incomplete.  First row could be P-1.  It might not be possible to symmetrically center the last row while maintaining hexagonal close packing.

Hexagonal close packing with all rows (except possibly last) having the same number of circles, but alternatingly shifted left and right.  This arrangement does not have bilateral symmetry, though maybe it does if tilted 90 degrees.

There are other more efficient packings for different values of N, but more irregular.

Inspiration was wanting to pack 128 items into a window for the world's hardest puzzle.