de Boor's algorithm

Similar to de Casteljau's algorithm for Bezier curves, we can apply de Boor's algorithm to find a point on a cubic B-spline at any value of \(t\). This again uses a recursive algorithm, with:

$$P_i^r(t)=(1-a_{i,r})P^{r-1}_{i-1}(t)+a_{i,r}P^{r-1}_i(t)$$

$$P_i^0=P_i$$

$$a_{i,r}=\frac{t-t_i}{t_{i+n-r}-t_i}$$

where \(t_i\) is the knot for which \(t_i\leq t \leq t_{i+1}\). For a curve of order \(n\) this is evaluated for \(P^{n}_i(t)\). In the example below the curve has order four, and so the point on the curve depends on the four control points \(P_{i-3},\ldots,P_i\).

For a uniform cubic B-spline as in the example above this is very similar to de Casteljau's algorithm, but with a different ratio of the points along the joining lines.