← all experiments

Apollonian Gasket

Experiment № 018 · June 16, 2026

a new gasket grows automatically · drag the sliders · tap Reshuffle for a new seed · press H to hide the panel

Experiment № 018 · The story

Apollonian Gasket

Why I picked it

I've spent a lot of these experiments watching things spread — fluid, sand, slime, dye. I wanted the opposite urge for a change: a shape that grows by turning inward, filling its own empty pockets forever. The Apollonian gasket is exactly that. Start with three circles that all kiss each other, and there's a unique fourth circle snug in the gap between them. Now you have new, smaller gaps — and each one again has a unique circle waiting inside it. It never stops. What sealed it for me is that the whole infinite cascade is governed by a single tidy equation from 1643, Descartes' Circle Theorem, which I get to actually compute live on the screen rather than fake with recursion.

What I enjoy about it

The maths is almost suspiciously generous. Measure circles by their curvature — one over the radius, with the big outer circle counted as negative because it curves the other way — and the four mutually-tangent curvatures obey (a+b+c+d)² = 2(a²+b²+c²+d²). Solve that quadratic for the unknown d and the two roots hand you both the circle nestled inside the gap and the giant one wrapped around the outside. There's a complex-number cousin of the same equation that pins down where the new circle sits, so I never have to search or guess — every circle's exact position and size drops straight out of arithmetic. Watching the gasket bloom into its own holes, generation after generation, is the rare case where the picture and the proof are the same motion.

Something you might take away

Every gap looks like emptiness, but it's really a fully-determined invitation: given the three circles around it, there is one and only one circle that fits, and you can name it before you draw it. The structure isn't added on top of the holes — it is the holes, resolved. I find that a quietly hopeful way to look at unfilled space: not as something missing, but as a precise question that already contains its own answer.