Apollonian Circle Packing

Recursive kissing circles: pack the gaps forever, discover a fractal with Hausdorff dimension ≈ 1.3057

Controls

Circles: 0 | Min radius: —

Descartes Circle Theorem

(k₁+k₂+k₃+k₄)²
 = 2(k₁²+k₂²+k₃²+k₄²)

k = curvature = 1/radius
(negative k = enclosing circle)

Given 3 mutually tangent circles, Descartes' theorem gives the curvature of the 2 tangent circles that fit in each gap. The formula is quadratic — exactly 2 solutions.

The Packing

Start with 3 mutually tangent circles inside a large enclosing circle. In each curvilinear triangle gap, pack a new circle tangent to all 3. Recurse forever.

The result is an Apollonian gasket — a fractal with Hausdorff dimension ≈ 1.3057...

Remarkably, if the initial 4 curvatures are integers, all curvatures remain integers (Apollonian group theorem, 1999).

Starting with curvatures (−1, 2, 2, 3): generates an integer Apollonian packing. Every integer that appears has special number-theoretic properties.