Theory & mathematics

Descartes' Circle Theorem

The curvature of a circle is k = 1/r. For four mutually tangent circles the curvatures obey (k₁+k₂+k₃+k₄)² = 2(k₁²+k₂²+k₃²+k₄²). Given three tangent circles, the two solutions for the fourth are k₄ = k₁+k₂+k₃ ± 2√(k₁k₂+k₂k₃+k₃k₁) — one circle nestled inside the curvilinear triangle, one enclosing the others.

Complex Descartes Theorem (centres)

Treating centres as complex numbers z = x + iy, the same identity holds for the products kz: k₄z₄ = k₁z₁+k₂z₂+k₃z₃ ± 2√(k₁k₂z₁z₂ + k₂k₃z₂z₃ + k₃k₁z₃z₁). This pins down exactly where each new tangent circle sits, so we can recurse into every triple of mutually tangent circles.

Integer (Apollonian) gaskets

If the first four curvatures are integers, every curvature in the gasket is an integer — the famous Apollonian integer packings such as (−1, 2, 2, 3). A negative curvature denotes the outer bounding circle that contains the rest.

Fractal dimension

The gasket is a true fractal: its set of tangency points has Hausdorff dimension ≈ 1.3057, independent of the starting configuration. The recursion here halts at a chosen depth or minimum radius to keep rendering finite.