Cox-de Boor recursion formula Created 2026-09-24 Updated 2026-11-05
For a nondecreasing spline knot sequence , initialize the order-one B-splines by . For , the Cox-de Boor recurrence is
A term with zero denominator is assigned zero. For clamped endpoint evaluation, take the appropriate one-sided continuous value rather than applying the half-open order-one convention beyond the final knot.[ref]
Each order- B-spline is assembled from two neighboring order- B-splines. On their active spans the weights are nonnegative, which proves nonnegativity inductively and keeps the support local. For simple equally spaced spline knots and , this produces the triangular hat. Evaluating a whole spline at one point can combine these same local affine steps through De Boor's algorithm.
The Cox-de Boor recurrence and De Boor's algorithm handle nonuniform knots and repeated knots without converting the whole curve. With a tabulated recurrence they require arithmetic after locating the span and use only local control points; a naive recursive basis evaluation wastes work by recomputing the same terms. De Boor's algorithm evaluates the vector directly using affine combinations. Inside the span these are convex combinations, which makes the geometric construction transparent and avoids the cancellation that can occur in a power-basis representation. Basis evaluation is especially useful when the same knots and parameter are shared by many coordinate functions or many curves, since the weights can be reused.
Precomputed power coefficients followed by Horner's method need only arithmetic per coordinate and are attractive for many evaluations within an unchanged span, particularly for fixed-degree uniform B-splines. Coefficient construction has an initial cost, control-point edits require updates to affected spans, and poor scaling of high-degree power coefficients can damage accuracy. Rescaling each span to helps. Bézier curve extraction has a similar initial conversion cost; De Casteljau's algorithm then gives stable local evaluation, subdivision, a convex hull bound and geometric flatness tests useful for rendering and intersection.
Subdivision is convenient when an entire polygonal approximation is wanted: refine only where needed and reuse the hierarchy. It is less economical for a single prescribed parameter and requires a geometric error bound before its approximate point can replace exact evaluation. Span lookup itself costs for sorted arbitrary knots, constant work for a uniform interior span, or amortized constant work for an ordered sequence of sample parameters. Use de Boor for robust general knots, shared basis weights for batches, and precomputed local polynomials or Bézier pieces for repeated interrogation.
Write a degree- B-spline as and locate its spline knot span. There are several equivalent exact evaluation methods.
Evaluate the at most nonzero basis functions by the Cox-de Boor recurrence, then form their weighted sum of control points. Alternatively apply De Boor's algorithm directly to the active control points. In a span , initialize and repeatedly interpolate:
for and . The last point is ; zero knot intervals are handled by the standard limiting convention or an appropriate neighboring nonempty span.
A third method precomputes the local polynomial coefficients on each span and evaluates them by Horner's method. For a uniform cubic B-spline, a fixed four-by-four basis matrix gives these coefficients. A fourth method uses knot insertion to express the relevant span as a Bézier curve, followed by De Casteljau's algorithm. Both interpolation algorithms also split the curve at the requested parameter. Repeated subdivision supplies arbitrarily accurate polygonal evaluation, although a finite subdivision mesh is generally an approximation rather than the exact requested point. Basis summation, de Boor interpolation, local polynomial evaluation and Bézier extraction are equivalent exact representations.