Descartes’ circle theorem — four mutually tangent circles

What this is? An SVG construction of four mutually tangent circles (one outer circle enclosing three inner ones). We show their curvatures (bend) k = ± 1/r and automatically check Descartes’ theorem: (k1 + k2 + k3 + k4)² = 2 · (k1² + k2² + k3² + k4²).

Drawing

Reason

  1. For four mutually tangent circles with curvatures kᵢ = ± 1/rᵢ (negative for the enclosing circle), Descartes’ circle theorem says: (k1 + k2 + k3 + k4)² = 2 · (k1² + k2² + k3² + k4²).
  2. Given three tangent circles with curvatures k1, k2, k3, the fourth curvature is k4 = k1 + k2 + k3 ± 2 · sqrt(k1·k2 + k2·k3 + k3·k1).

Check