Circles
Largest curvature
Covered
Fractal dimension

More information about the Apollonian gasket

Apollonian gasket generator

Put three circles inside a fourth so that all four touch. Between them lie curved triangles, and each of those holds exactly one circle that touches its three sides. Put it in, and it leaves three smaller gaps; fill those, and keep going. Watch the Apollonian gasket fill up generation by generation until thousands of circles cover almost all of the disc, write the curvature in every circle, and see that starting from whole numbers every single circle gets a whole-number curvature. Three circles touch each other inside a fourth. Every curved triangle between them holds exactly one circle that touches all three, and each new circle opens three new gaps. Press Play to fill the gasket generation by generation, or Step to add one generation. Choose the starting circles by their curvatures, such as (−1, 2, 2, 3), or Custom to split the diameter between the first two circles yourself. Tap a circle to ring it and the three circles it was born touching; the row under the picture checks Descartes' circle theorem on those four. Colour the circles by curvature, by generation or in one colour, and show the curvatures inside them.

How it works

  1. Press Play to fill the gasket one generation at a time, or Step to add a single generation; drag Generations to jump to any of the first 9.
  2. Choose the starting circles by their curvatures, such as (−1, 2, 2, 3) or (−6, 11, 14, 15), or Custom to split the diameter between the first two circles yourself.
  3. Tap a circle to ring it and the three circles it was born touching, and read Descartes' theorem for those four under the picture.
  4. Colour the circles by curvature, by generation or in one colour, show the curvatures, then save the picture or open it in the editor in layers.

One circle in every gap

Three circles that touch each other in pairs leave a curved triangle between them, and exactly one circle fits in it touching all three sides. Apollonius of Perga studied such circles around 200 BC. Start with three touching circles inside a fourth: they leave four gaps, so generation 1 has four circles. Every new circle splits its gap into three smaller ones, so generation g has 4·3^(g−1) circles: 4, 12, 36, 108 and so on. The Fill every gap switch keeps going in the narrow slivers near the points of contact, which only very late generations reach.

Curvatures that stay whole numbers

The curvature of a circle is one over its radius, and the outer circle, which holds the others, counts as negative. In 1643 René Descartes found that four touching circles always satisfy (k₁ + k₂ + k₃ + k₄)² = 2(k₁² + k₂² + k₃² + k₄²). So the two circles that touch three given circles have curvatures adding up to 2(k₁ + k₂ + k₃): the new circle in a gap has curvature 2(k₁ + k₂ + k₃) − k, where k is the circle on the other side. Start from whole numbers, as in (−1, 2, 2, 3), and only additions and doublings follow, so every circle has a whole-number curvature.

A disc covered by circles, almost

With every generation the circles cover more of the outer disc: 99% after a few hundred circles, and in the limit all of it. What remains is a dust of points between the circles, the residual set, with no area at all. It is still a fractal: its Hausdorff dimension is about 1.3057, the same for every Apollonian gasket, between a line (1) and a filled region (2). Curtis McMullen computed it to many digits in 1998.

Frequently asked questions

What is an Apollonian gasket?

A fractal made of circles. Start with three circles that touch each other inside a fourth circle that touches all three. Every curved triangle between touching circles holds exactly one circle that touches all three of its sides; adding those circles, and then the ones in the new gaps, again and again, fills the disc with infinitely many circles. It is named after Apollonius of Perga, who studied circles touching three given circles.

Why are all the curvatures whole numbers?

Because of Descartes' circle theorem. For four touching circles, (k₁ + k₂ + k₃ + k₄)² = 2(k₁² + k₂² + k₃² + k₄²), so the two circles that touch the same three circles have curvatures adding up to 2(k₁ + k₂ + k₃). Each new curvature is therefore twice the sum of three curvatures minus a fourth. If the four starting curvatures are whole numbers, every curvature after them is too. The outer circle counts as negative because the others lie inside it.

Which starting quadruples give a whole-number gasket?

Any four whole numbers that satisfy Descartes' theorem, such as (−1, 2, 2, 3), (−2, 3, 6, 7), (−3, 4, 12, 13), (−4, 8, 9, 9), (−6, 10, 15, 19) or (−6, 11, 14, 15), the ones the Start menu offers. The first number is the outer circle. There are infinitely many such root quadruples; with (−1, 2, 2, 3) the outer circle has radius 1 and the two largest inner circles radius ½.

Does the gasket cover the whole disc?

In the limit, yes: the circles cover all of its area. The Covered tile shows the share so far, which passes 99% within a few generations. What is left is a dust of points between the circles with an area of zero, but it is a fractal with a dimension of about 1.3057.

What does tapping a circle show?

It rings the circle and, with dashed lines, the three circles it was born touching, its parents. The tile shows its curvature and generation, and the line under the picture writes out Descartes' theorem for the four of them, so you can check it with your own numbers.

Can I use the gasket in a design?

Yes. Save gives a PNG, and the pencil opens the gasket in the PictorX photo editor with the background, the outer circle, the starting circles, each early generation, the smaller circles and the curvatures on layers of their own, so you can recolour a generation or hide the numbers. In the editor itself it is under Apps ▸ Fractals ▸ Apollonian Gasket. Everything is drawn in your browser.

Apollonian Gasket: how do I record a video?

Press the red Record button in the playback bar: it films what the stage shows. Press it again to stop, and the video is saved to your device. Recording is free; you only need to sign in. Without a subscription the video carries a small PictorX logo in a corner. The button beside Record opens the video options: the shape (as shown, square, story 9:16 or wide 16:9), the length (until you stop, or 5, 10, 15 or 30 seconds for social media) and the file: MP4, WebM or an animated GIF. You can add one of three music tracks: calm, bright or beat.

Ready to try it?

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

Go to Editor