De Boor's algorithm
From Wikipedia, the free encyclopedia
In the mathematical subfield of numerical analysis the de Boor's algorithm is a fast and numerically stable algorithm for evaluating spline curves in B-spline form. It is a generalization of the de Casteljau's algorithm for Bézier curves. The algorithm was devised by Carl R. de Boor.
Contents |
[edit] Introduction
The general setting is as follows. We would like to construct a curve passing through a sequence of p points . The curve can be described as a function of one parameter x. To pass through the sequence of points, the curve must satisfy . We assume that u0, ..., up-1 are given to us along with . This problem is called interpolation.
One approach to solving this problem is by splines. A spline is a curve that is piecewise nth degree polynomial. This means that, on any interval [ui, ui+1), the curve must be equal to a polynomial of degree at most n. It may be equal to a different polynomials on different intervals. The polynomials must be synchronized: when the polynomials from intervals [ui-1, ui) and [ui, ui+1) meet at the point ui, they must have the same value at this point and their derivatives must be equal (to ensure that the curve is smooth).
de Boor algorithm is an algorithm which, given u0, ..., up-1 and , finds the value of spline curve at a point x. It uses O(n2) operations. Notice that the running time of the algorithm depends only on degree n and not on the number of points p.
[edit] Outline of the algorithm
Suppose we want to evaluate the spline curve for a parameter value . We can express the curve as
where and
Due to the spline locality property,
So the value is determined by the control points ; the other control points have no influence. de Boor's algorithm, described in the next section, is a procedure which efficiently evaluates the expression for .
[edit] The algorithm
Suppose and for i = l-n, ..., l. Now calculate
with
Then .