GenerateRandomSearch

Tangent Circle Generator

Three circles that all touch each other leave a curved gap, and exactly two circles fit tangent to all three — a small one nestled in the gap and a large one enclosing the lot. Descartes' circle theorem gives both from the curvatures alone, without any geometry at all. This computes them from three radii you choose, then checks the answer two independent ways: the curvature relation, and the actual distances between centres.

What this generator does

Places three circles so that each pair touches, then applies Descartes' circle theorem to the curvatures to find the two circles tangent to all three. Both the theorem and the tangency of the original three are checked before display.

How to use this tool

  1. Enter three radii; the circles are placed so each touches the other two.
  2. Read the radius of the circle that fits in the gap between them.
  3. Try three equal radii, then three very different ones.
  4. Note the curvatures: they are one over the radius, which is what the theorem uses.

Understanding the controls

Three radii
Each between 1 and 50. The circles are positioned automatically so every pair touches — the radii alone determine the whole figure up to rotation.
Very different radii
Try one large and two small: the circle that fits in the gap becomes dramatically smaller, which is the effect that makes Apollonian gaskets look the way they do.

Common use cases

  • Working through Descartes' circle theorem with real numbers
  • Setting up an Apollonian gasket construction by hand
  • Teaching curvature as the reciprocal of radius
  • Checking a tangent-circle calculation against an independent method
  • Generating figures for a circle geometry problem

How this generator works

Two circles that touch have centres exactly the sum of their radii apart, so the three centres are fixed by three distances and placed by triangulation. Curvature is one over the radius, and Descartes' circle theorem says the four curvatures of four mutually tangent circles satisfy a fixed quadratic relation — solving it for the fourth gives two answers, the inner and outer circles. Before display, every pair of the original centres is measured to confirm the gap really is the sum of the radii, and both solutions are substituted back into the theorem.

Randomness and fairness

Nothing here is random. Three radii determine the entire figure, so the same input always gives the same circles.

For how randomness is produced across the whole site, see how Generate Random works.

Limitations and good to know

  • Only the three-circle case is computed; extending it into a full Apollonian gasket means applying the same step repeatedly, which this does not do.
  • The outer solution has negative curvature when it encloses the others, which is correct but reads oddly if you expect a radius to be positive.
  • Positions are given in a fixed orientation with the first circle at the origin; rotating the whole figure changes nothing.
  • Floating-point arithmetic means the tangency check uses a small tolerance rather than exact equality.

Privacy and your data

The construction is computed in your browser and the radii you enter are never transmitted, stored or included in analytics.