Content deleted Content added
mNo edit summary |
finished rewriting |
||
Line 1:
In [[mathematics]], '''De Boor algorithm''' is an algorithm for evaluating [[spline]] curves.
== Introduction ==
The general setting is as follows. We would like to construct a curve passing through a sequence of points <math>\vec{d}_0, \vec{d}_1, \dots, \vec{d}_p</math>. The curve will be specified as a function <math> \vec{s}(x)</math> of one parameter ''x''. To pass through the sequence of points, the curve must satisfy <math>\vec{s}(u_0)=\vec{d}_0, \dots,▼
\vec{s}(u_p)=\vec{d}_p</math>. We assume that ''u<sub>0</sub>, ..., u<sub>p</sub>'' are given to us along with <math>\vec{d}_0, \vec{d}_1, \dots, \vec{d}_p</math>.▼
▲The general setting is as follows. We would like to construct a curve passing through a sequence of ''p'' points <math>\vec{d}_0, \vec{d}_1, \dots, \vec{d}
▲\vec{s}(
One approach to solving this problem is by [[spline]]s. A spline is a curve that is piecewise ''n<sup>th</sup>'' degree polynomial. This means that, on any interval ''[u<sub>i</sub> , u<sub>i+1</sub>)'', 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 ''[u<sub>i-1</sub> , u<sub>i</sub>)'' and ''[u<sub>i</sub> , u<sub>i+1</sub>)'' meet at the point ''u<sub>i</sub>'', 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 ''u<sub>0</sub>, ..., u<sub>p-1</sub>'' and <math>\vec{d}_0, \vec{d}_1, \dots, \vec{d}_{p-1}</math>, finds the value of spline curve <math>\vec{s}(x)</math> at a point ''x''. It uses [[Big O notation|O]](n<sup>2</sup>) operations. Notice that the running time of the algorithm depends only on degree ''n'' and not on the number of points ''p''.
== Goal of the algorithm==▼
:<math> \vec{s}(u) = \sum_{i=-n}^{p-1} \vec{d}_i N_i^n(u), </math>▼
We can express the curve as
▲defined on the interval <math> [u_0,u_p) </math> for a parameter value <math> x \in [u_{\ell},u_{\ell+1}) </math>.
Due to the spline locality property, we can write▼
where ''N<sub>i</sub><sup>n</sup>(x)'' are polynomials in x with coefficients depending on ''u<sub>0</sub>, ..., u<sub>p</sub>'' but not <math>\vec{d}_i</math>.
:<math> \vec{s}(x) = \sum_{i=\ell-n}^{\ell} \vec{d}_i N_i^n(x) </math>
So the value <math>\vec{s}(x)</math> is determined by the controlpoints <math> \vec{d}_{\ell-n},\vec{d}_{\ell-n+1},\dots,\vec{d}_{\ell} </math>; the other control points <math>\vec{d}_i</math> have no influence.
== The algorithm ==
Suppose <math> x \in [u_{\ell},u_{\ell+1}) </math> and <math> \vec{d}_i^{[0]} = \vec{d}_i </math> for
Now calculate
:<math> \vec{d}_i^{[k]} = (1-\alpha_{k,i}) \vec{d}_{i-1}^{[k-1]} + \alpha_{k,i} \vec{d}_i^{[k-1]}; \qquad k=1,\dots,n; \quad i=\ell-n+k,\dots,\ell </math>
|