The Apollonian gasket explained

The Apollonian gasket is what you get when you never stop filling gaps. Three touching circles inside a fourth leave curved triangles between them; each holds exactly one circle that touches its three sides, and every new circle leaves three new gaps. The circles end up covering the whole disc, and if you start from the right numbers, every one of them has a whole-number curvature.

An Apollonian gasket from the curvatures −1, 2, 2 and 3, the circles coloured from indigo to gold by curvature, each large circle labelled with its whole-number curvature
An Apollonian gasket from the curvatures −1, 2, 2 and 3, the circles coloured from indigo to gold by curvature, each large circle labelled with its whole-number curvature

The problem of Apollonius

Around 200 BC the Greek geometer Apollonius of Perga asked which circles touch three given circles. For three circles that already touch each other in pairs the answer is simple: there are exactly two, one in the curved triangle between them and one around or beside them. The Apollonian gasket is built entirely from this fact. Begin with four mutually touching circles, the outer one holding the other three, and put the one fitting circle into every gap, then into every gap that leaves, for ever.

Counting the circles

The four starting circles leave four gaps, so the first generation adds four circles. Each new circle sits in a curved triangle and splits it into three smaller ones, so every generation has three times as many circles as the one before: 4, 12, 36, 108, 324 and so on, 4·3^(g−1) in generation g. After nine generations there are almost 40,000 circles. Generations are not sizes, though: next to the points where two large circles touch, the gaps are thin slivers, and a circle there may belong to a late generation and still be bigger than circles found much earlier.

Descartes' circle theorem

Measure a circle by its curvature, one over its radius, so that small circles have large curvatures. Count the outer circle as negative, because the others lie inside it. In a letter of 1643 to Princess Elisabeth of Bohemia, René Descartes showed that four mutually touching circles always satisfy (k₁ + k₂ + k₃ + k₄)² = 2(k₁² + k₂² + k₃² + k₄²). In 1936 the chemist Frederick Soddy rediscovered the formula and published it as a poem, The Kiss Precise, which is why touching circles are often called kissing circles.

Why the curvatures are whole numbers

Read Descartes' theorem as a quadratic equation for k₄ and its two solutions add up to 2(k₁ + k₂ + k₃): those are the two circles that touch the same three circles. So once one of them is known, the other is k₄′ = 2(k₁ + k₂ + k₃) − k₄. Every circle of the gasket is made this way from circles already there, using only additions, doublings and subtractions. Start from four whole numbers that satisfy the theorem, such as −1, 2, 2 and 3, and every one of the infinitely many curvatures that follow is a whole number. The classic gasket grows 3, 6, 6 and 15 in its first generation, and new ones such as 11, 14, 23, 35 and 38 in the second.

Where the centres go

The positions follow a similar rule. Write each centre as a complex number z and multiply it by the curvature. In 2002 Jeffrey Lagarias, Colin Mallows and Allan Wilks showed that these products satisfy the same Descartes equation as the curvatures, so the new centre is found from the same reflection: k′z′ = 2(k₁z₁ + k₂z₂ + k₃z₃) − kz. The generator uses exactly this to place every circle, without solving any geometry beyond the first four circles.

Which numbers appear

An integral gasket does not use every whole number as a curvature, but it uses a great many. Within a gasket the curvatures avoid certain remainders: in the (−1, 2, 2, 3) gasket every curvature leaves a remainder of 0, 2, 3, 6, 11, 14, 15, 18 or 23 when divided by 24. Ronald Graham, Lagarias, Mallows, Wilks and Catherine Yan conjectured in 2003 that every large enough number with an allowed remainder does appear. Jean Bourgain and Alex Kontorovich proved that almost all of them do, but in 2023 Summer Haag, Clyde Kertzer, James Rickards and Katherine Stange found gaskets that miss whole families of allowed numbers, such as every perfect square, so the conjecture is false as stated.

The dust that is left

The circles cover more of the disc with every generation, and in the limit they cover all of its area. What is left between them, the residual set, is a dust of points with no area, yet it is not a curve either. Its Hausdorff dimension is about 1.30568, the same for every Apollonian gasket, because any two gaskets can be carried onto each other by a Möbius transformation. Curtis McMullen computed this number to many digits in 1998. The radii of the circles reflect it too: the number of circles larger than r grows like r to the power −1.3057.

Relatives

Let the outer circle grow until it becomes a straight line and the gasket turns into the Ford circles, which sit on the number line at every fraction p/q with radius 1/(2q²). With two parallel lines you get the Apollonian strip. The gasket is also the limit set of a group of Möbius transformations, the kind of picture studied in the book Indra's Pearls by David Mumford, Caroline Series and David Wright. In three dimensions the same idea packs spheres into the gaps between touching spheres.

Explore it

Open the Apollonian gasket generator and press Play to watch the gaps fill up, generation by generation. Pick a starting quadruple such as (−3, 4, 12, 13), or Custom to split the diameter between two circles yourself, show the curvatures, and tap any circle to see its three parents and check Descartes' theorem with its numbers. The pencil opens the gasket in the photo editor with the outer circle, the starting circles, each early generation, the smaller circles and the numbers on layers of their own.

Frequently asked questions

Who discovered the Apollonian gasket?

It is named after Apollonius of Perga, who around 200 BC studied the circles that touch three given circles. The key formula, Descartes' circle theorem, dates from 1643. Edward Kasner and Fred Supnick studied the endless packing of circles in 1943, and Benoit Mandelbrot made it a standard example of a fractal.

What is Descartes' circle theorem?

For four circles that each touch the other three, the curvatures k = 1/r satisfy (k₁ + k₂ + k₃ + k₄)² = 2(k₁² + k₂² + k₃² + k₄²), where a circle that encloses the others counts as negative. For the starting circles (−1, 2, 2, 3) both sides are 36.

How many circles are in each generation?

Generation g has 4·3^(g−1) circles: 4, 12, 36, 108 and so on, because each new circle splits its gap into three. After n generations there are 3 + 2(3ⁿ − 1) circles inside the outer one.

What is the fractal dimension of the Apollonian gasket?

The set of points not covered by any circle has a Hausdorff dimension of about 1.30568, computed by Curtis McMullen in 1998. It is the same for every Apollonian gasket.

Are Ford circles an Apollonian gasket?

Yes, a limiting one. When the outer circle becomes a straight line with curvature 0, the circles touching it and each other are the Ford circles: one at every fraction p/q, with radius 1/(2q²). They follow the same Descartes rule as the circles of a gasket.

Ready to try it?

Open PictorX in your browser — no install, no credit card required to start.

Open the Apollonian gasket generator