# Cubic NURBS by de Boor’s Method

- Author:
- Daniel Neville

- Topic:
- Parametric Curves

## Description

De Boor’s algorithm for NURBS curves is similar to de Casteljau’s algorithm for Bézier curves. Whereas the u parameter is uniformly applied to each span of each linear interpolation stage in de Casteljau’s algorithm, the linear interpolation parameters in de Boor’s algorithm is determined from selected spans of the Knot Vector. NURBS allow a curve to be stitched from piecewise polynomial curves in a manner that is more convenient than a string of independent Bézier curves.

## Details

A NURBS curve features local support and the active control points influencing the curve for any given value of u are determined by the two adjacent knot values which straddle u and the blossom of knot selection indices. The numbering of control points and knots is such that the lowest index of the knot selection blossom is also the lowest index of the active control points.
The values of the knots themselves (rather than their indices) are in parameter space. Along with the selection indices, they form spans which are divided by the NURBS parameter u to form a blossom pyramid of interpolated u-values. Those interpolated u-values are then fed to the recursive linear interpolation of the active control points.
In the special case of the Knot Vector being degree k zeros, k ones, the NURBS Curve is a Bézier with standard parameterisation. In this case, the knot selection spans all straddle the 0–1 transition and cause the lerp parameters to have the same value, u.
The “Rational” part of NURBS allow circular arcs to be faithfully described with quadratic curves in homogeneous coordinates. In homogeneous coordinates, Plato’s Cave is at w = 1 and Azathoth is at origin at w = 0. Homogeneous coordinates are not specified directly, but are instead generated from control points by first scaling each control point by its weight, then appending the weight as the w coordinate. This convention preserves the ability of the control polygon to indicate curve tangents. After the lerping in homogeneous coordinates is done, the result is back-projected to the w = 1 plane and the w coordinate is discarded. For convenience, Azathoth in this demonstration is movable.