The term "closed-form" appears frequently in discussions of analytic geometry and CNC programming. It has a precise mathematical meaning — and understanding it helps explain why XyzPilot produces exact results where other systems produce approximations.
The Definition
A closed-form expression is a mathematical expression that can be evaluated in a finite number of standard operations — addition, subtraction, multiplication, division, square roots, trigonometric functions, and similar elementary operations.
The key word is finite. A closed-form expression does not require iteration. It does not converge to a result. It computes the result directly, in a fixed number of steps.
Examples of Closed-Form Geometry
The intersection of a line and a circle has a closed-form solution. Given the line equation ax + by + c = 0 and the circle equation (x−cx)² + (y−cy)² = r², substituting the line into the circle gives a quadratic equation. The quadratic formula gives the two roots directly — no iteration required.
The tangent point from an external point to a circle has a closed-form solution. The perpendicular from the circle centre to the tangent line, the tangent length formula — all computed directly.
The fillet arc between two lines has a closed-form solution. The offset lines, their intersection (the arc centre), the tangent points — all computed directly.
What Is Not Closed-Form
Some geometric problems do not have closed-form solutions. The intersection of two general cubic curves, for example, requires numerical methods. The fitting of a spline through a set of points with specific curvature constraints requires numerical optimisation.
For these problems, numerical methods are appropriate. The result is approximate, but there is no alternative.
For the geometry used in CNC machining programs — intersections, tangencies, parallel offsets, fillet arcs — closed-form solutions exist. Using numerical methods for these problems introduces unnecessary approximation.
Why Closed-Form Matters for CNC
A closed-form computation has three properties that matter for CNC machining programs:
- Exactness — the result is exact, not approximate. No tolerance, no rounding error.
- Reproducibility — the same inputs always produce the same result. No starting state dependency.
- Speed — the computation completes in a fixed number of steps. No convergence time.
These properties make closed-form geometry the correct foundation for CNC machining programs.
XyzPilot's Closed-Form Engine
Every one of XyzPilot's 66 geometry operators uses a closed-form formula. The intersection of a line and circle, the tangent point between two circles, the fillet arc between two lines — all computed directly, in a single pass, with exact results.
This is not a technical achievement. It is a design choice. The geometry used in CNC machining programs has been known to have closed-form solutions since the 1950s. XyzPilot simply implements those solutions correctly.