scroll ↓ or press play

Fitting circles together

The best way to fit round things in a flat space, and why you get seams.

What you are looking at

Dots push away from their neighbors. They settle into neat patches, colored by which way the rows point. Where two patches meet there is a seam.

The idea

How do you fit the most coins on a plate? You could try rows of squares. But the coins fit better if each row sits in the gaps of the row before it. Then each coin touches six others, and the gaps are as small as they can be.

The dots in the animation do not know this. They only know one thing: do not overlap, and push away when too close. Even so, they end up in the best pattern, just like the coins.

The colors show which way each patch of rows is turned. When two patches start in different places, they do not line up. Where they meet, you see a seam, because the dots there have five or seven neighbors instead of six.

Where else you see it

Go deeper: the proper names and the math

For equal discs, hexagonal packing reaches the maximum density of π/(2√3) ≈ 0.9069. The animation colors each particle by its local bond-orientational order, ψ6 = ⟨e6iθ⟩, averaged over the angles θ to its neighbors. It has a magnitude near 1 when a particle sits in a perfect hexagonal neighborhood, and its phase tells you the direction of the rows.

Seams are grain boundaries made from dislocations, where particles have 5 or 7 neighbors. How a two-dimensional solid melts, and the in-between "hexatic" phase, is the subject of the Kosterlitz–Thouless–Halperin–Nelson–Young theory.

← Watch the animation  ·  All explanations