I recently found a bunch of tiny spherical toy magnets, and I've been having fun sticking them into various shapes.
In two dimensions, there are only two possible packings of the magnets: a square and a hexagonal lattice. There's some interesting physics going on between these two phases.
- In the square phase, alternating lines of magnets need to have opposite polarity. In the hexagonal phase, they need the same polarity. As a result, the phases really don't want to coexist; trying to build a crystal alternating between the two falls apart.
- The hexagonal lattice appears marginally more stable. When I construct a 'random' 2D lattice by quickly smushing a ball of magnets, it usually looks more hexagonal.
- Despite this, the square lattice is kinetically stable for large lattices. The transition point seems to be about $2 \times 2$. I was able to build a large tower with a $2 \times 2$ square lattice cross section, but it spontaneously turned hexagonal with a little tap.
I haven't been able to analyze the 3D case, where the structures are more complicated, because I don't have enough magnets. What physical models are behind this toy? What are the most stable structures in 3D?