Finding the intersection of two circles is one of the most common operations in CNC profile construction. Bolt-hole patterns, tangent circle chains, complex profile geometry — all depend on circle-circle intersections computed correctly.

When Two Circles Intersect

Two circles intersect when the distance between their centres is between the absolute difference and the sum of their radii:

|r₁ − r₂| < dist(centres) < r₁ + r₂

  • If dist = r₁ + r₂: circles are externally tangent (one intersection point)
  • If dist = |r₁ − r₂|: circles are internally tangent (one intersection point)
  • If dist < |r₁ − r₂|: one circle is inside the other (no intersection)
  • If dist > r₁ + r₂: circles are too far apart (no intersection)

The Radical Axis Method

The analytic method for finding circle-circle intersections uses the radical axis — a line perpendicular to the line connecting the two centres, passing through both intersection points.

The method:

  1. Write the two circle equations: (x−cx₁)² + (y−cy₁)² = r₁² and (x−cx₂)² + (y−cy₂)² = r₂²
  2. Subtract one from the other — this eliminates the quadratic terms and gives a linear equation (the radical axis)
  3. Substitute the radical axis equation back into either circle equation — this gives a quadratic with two roots
  4. The two roots are the X coordinates of the intersection points; substitute back to find Y

The result is exact. No iteration, no approximation, no tolerance.

Why Two Solutions Exist

Two circles that intersect always do so at exactly two points (unless they are tangent, in which case there is one point). This is a fundamental property of circles in the Euclidean plane.

The two intersection points are symmetric about the line connecting the two centres. They have the same X coordinate (if the centres are on the same horizontal line) or the same Y coordinate (if the centres are on the same vertical line).

This is why XyzPilot requires a direction selector for circle-circle intersections. The selector specifies which of the two intersection points to create — the upper one (YLarge) or the lower one (YSmall), the right one (XLarge) or the left one (XSmall).

A Worked Example

C0: centre (50,50), radius 40. C1: centre (90,50), radius 40.

Distance between centres = 40. Since |40−40| = 0 < 40 < 40+40 = 80, the circles intersect at two points.

Applying the radical axis method:

  • Radical axis: x = 70 (vertical line through the midpoint)
  • Substituting into C0: (70−50)² + (y−50)² = 40² → 400 + (y−50)² = 1600 → (y−50)² = 1200 → y = 50 ± √1200
  • YLarge solution: y = 50 + 34.641 = 84.641 → P = (70, 84.641)
  • YSmall solution: y = 50 − 34.641 = 15.359 → P = (70, 15.359)

In XyzPilot: Point/YSmall, Intof, C0, C1 → P = (70, 15.359). Exact. No approximation.

Applications in CNC Machining Programs

Circle-circle intersections are used in CNC machining programs to:

  • Locate points on complex profiles defined by intersecting circles
  • Find the centre of a circle tangent to two existing circles
  • Verify that two circles are tangent (intersection reduces to one point)
  • Construct geometry from drawing dimensions that specify circle positions and radii