next up prev
Next: Future Work Up: Interpolation Previous: Quaternion interpolation

BSpline interpolation

one dimensional spline example

\resizebox*{0.75\textwidth}{!}{\rotatebox{270}{\includegraphics{spline.eps}}}

The BSpline interpolation is implemented as described in [watt92]. Input is a set of n one dimensional data points Xi \( i\in \left[ 0\ldots n-1\right] \)and a knot vector \( \overrightarrow{t} \) containing n+6 knots. A set of n+2 control points pi are generated so that a cubic spline with those control points will fit the data. The control points are such that p0=p1 and pn+1=pn+2. We also subject the curve to the constraint that \( Q\left( t_{i+3}\right) =X_{i}, \) \( \forall i\in \left[ 0,n\right] . \) This means that the curve is defined over the interval \( \left[ t_{3},t_{n-1}\right] . \) This system of equations is then solved to get the control points for the curve.

The curve at time u is given by a weighted sum of the control points \( Q\left( u\right) =\sum _{i=0}^{n+2}p_{i}N_{i,4}\left( u\right) . \) The Blending functions are as follows:

\begin{displaymath}
N_{i,1}\left( u\right) =\left\{ \begin{array}{ll}
1 & \textr...
...{i}\leq u<t_{i+1}\\
0 & \textrm{otherwise}
\end{array}\right. \end{displaymath}


\begin{displaymath}
N_{i,k}\left( u\right) =\frac{\left( u-t_{i}\right) N_{i,k-1...
... t_{i+k}-u\right) N_{i+1,k+1}\left( u\right) }{t_{i+k}-t_{i+1}}\end{displaymath}

Higher dimensional interpolants can be generated by interpolating each element independently.

In general, the interpolation of a parameter proceeds as follows:

 

control_points = get_control_points(data, knots);

 

interpolant = spline_at(t, control_points);



brian martin
1999-06-23