The Apollonian gasket
Begin with four mutually tangent circles, allowing one to surround the others. Every curved triangular gap admits another tangent circle, and repeating the insertion creates an Apollonian gasket.

Descartes’ circle theorem
For four mutually tangent circles, their signed curvatures satisfy a quadratic relation known as Descartes’ theorem. Given three compatible circles, it determines the possible fourth curvatures and enables recursive generation.
For three mutually tangent circles, Descartes’ theorem relates their curvatures bᵢ=1/rᵢ. A fourth tangent circle satisfies (b₁+b₂+b₃+b₄)²=2(b₁²+b₂²+b₃²+b₄²). There are usually two solutions: the small circle inside the gap and an enclosing circle. Repeating the calculation in every new gap grows the packing without guessing either radius or position.
Packing without filling
New circles occupy ever smaller gaps. Their union becomes dense near a residual set whose structure is fractal, while the uncovered gasket has zero area in the ideal limit.
Every new circle occupies part of a curved triangular gap but creates three smaller gaps. In the limit, the leftover set has zero area while the boundary contains infinitely many circles. A finite graphic must stop by radius or pixel size; otherwise subpixel circles become noise. Area filling and visible completeness are different: the mathematical packing continues, while an image needs a meaningful scale cutoff.
Geometry meets arithmetic
When the initial curvatures are chosen appropriately, every circle in the packing can have integer curvature. These integral packings link visual recursion to Diophantine equations, group actions and modern number theory.
Starting from integer curvatures, the recursive Descartes operation can continue to produce integer curvatures. This creates an unexpected connection with Diophantine equations and group actions. Colorful circle images do not reveal that arithmetic automatically; it emerges when curvatures are labeled or residue classes examined. The example joins elementary-looking tangency geometry to deep number theory behind the picture.
Sources and further reading
This article summarizes the following specialist sources in original wording. Accessed and editorially reviewed 12 August 2026.
- Apollonian GasketWolfram MathWorld
- Fractal Geometry: Mathematical Foundations and ApplicationsWiley


