Apollonian Gasket Generator
Infinite fractal circle packing via Descartes’ theorem — every gap between three tangent circles is filled by the unique Soddy circle, forever.
◎ Descartes’ Theorem
Four mutually tangent circles with curvatures k₁–k₄ satisfy (k₁+k₂+k₃+k₄)² = 2(k₁²+k₂²+k₃²+k₄²). This 1643 result (rediscovered by Soddy in verse, 1936) drives the entire gasket construction.
∞ Fractal Dimension
The Apollonian gasket has Hausdorff dimension ≈ 1.3057 — strictly between a curve (1) and a filled region (2). The circles pack the outer disc asymptotically perfectly, but the residual set is an uncountable Cantor-like fracture.
ℤ Integer Curvatures
Starting from integer curvatures (like −1, 2, 2, 3), every circle in the gasket also has integer curvature. This deep arithmetic fact connects the gasket to quadratic forms, Apollonian group orbits, and prime distribution in integer packings.
🔬 Connections
Apollonian gaskets appear in Ford circles (Farey sequences), Kleinian group limit sets, conformal mappings of the Riemann sphere, and Schottky groups in complex analysis — all different faces of the same inversive geometry.
The Apollonius Problem
Around 200 BC, Apollonius of Perga asked: given three circles, how many circles are tangent to all three? In general there are eight solutions (Apollonius circles). When the three original circles are themselves mutually tangent, two of the eight collapse to a single pair of Soddy circles — one fitting in the interior gap, one enclosing all three.
The Apollonian gasket is the fractal generated by starting with four mutually tangent circles, then filling every curvilinear triangular gap with the unique Soddy circle that fits, and repeating for ever. This simulator uses the starting packing with curvatures (−1, 2, 2, 3).
Descartes’ Circle Theorem
The inverse Descartes formula avoids square roots entirely once the initial four circles are known. Given the four circles (k₁,k₂,k₃,k₄), a fifth circle k₅ that is tangent to k₁,k₂,k₃ but on the other side from k₄ satisfies:
Integer Apollonian Packings
| Curvature k | Radius r = 1/k | Notes |
|---|---|---|
| −1 | 1 | Outer enclosing circle |
| 2 | 0.500 | Two initial inner circles (×2) |
| 3 | 0.333 | Two Soddy circles of initial triple (×2) |
| 6 | 0.167 | Next generation (×4) |
| 11 | 0.091 | (×4) |
| 14 | 0.071 | (×4) |
| 15 | 0.067 | Central circle between all three inner circles (×1) |
| 18–500 | <0.056 | Thousands of circles from recursion… |
Every circle in this gasket has integer curvature. A spectacular theorem: the integers that appear as curvatures of circles in a bounded Apollonian packing (with integer root quadruple) contain almost all integers — every sufficiently large integer occurs, with at most finitely many exceptions (Bourgain–Kontorovich, 2014, resolving an old conjecture).
Fractal Structure
The Apollonian gasket is self-similar: every curvilinear triangle between three tangent circles contains a complete smaller copy of the gasket. It is also conformally invariant: any Möbius transformation (a map z ↦ (az+b)/(cz+d)) sends one Apollonian gasket to another. The group of Möbius symmetries of the gasket is an infinite Kleinian group, and the gasket is its limit set.
The Hausdorff dimension of the gasket is approximately 1.3057 (Boyd 1973, confirmed rigorously by Sullivan 1979 using ergodic theory for Kleinian groups). Almost all the area of the outer disc is covered by the circles: the residual set — the fractal “dust” between all the circles — has Lebesgue measure zero.
FAQ
What is an Apollonian gasket?
A fractal created by starting with three mutually tangent circles and repeatedly filling every curvilinear triangular gap with the unique Soddy circle that fits. Named after Apollonius of Perga (~200 BC); the modern gasket construction traces to Leibniz and Soddy (1936). This simulator starts from the quadruple (−1, 2, 2, 3).
What is Descartes’ Circle Theorem?
If four mutually tangent circles have curvatures k₁,k₂,k₃,k₄, then (k₁+k₂+k₃+k₄)² = 2(k₁²+k₂²+k₃²+k₄²). Given any three, the two Soddy circle curvatures are k₄ = k₁+k₂+k₃ ± 2√(k₁k₂+k₂k₃+k₃k₁). The inverse form k₄' = 2(k₁+k₂+k₃)−k₄ requires no square roots and powers the recursive generation in this simulation.
Why are all curvatures integers in this gasket?
Starting from the integer quadruple (−1,2,2,3), every new circle uses the inverse formula k_new = 2(k₁+k₂+k₃)−k_old. Since the right-hand side is an integer combination of integers, all generated curvatures remain integers. This arithmetic closure is a hallmark of Apollonian packings with integer root quadruples, and leads to deep connections with the Apollonian group and quadratic Diophantine equations.
What is the fractal dimension of an Apollonian gasket?
Approximately 1.3057 (Hausdorff dimension). The gasket sits between a 1D curve and a 2D area. Almost all area of the outer disc is covered by circles, but the uncovered "dust" (the true gasket) has measure zero and dimension ~1.306. This was computed numerically by Boyd (1973) and connected to spectral theory of Kleinian groups by Sullivan (1979).