Game Development Reference
In-Depth Information
Spline interpolation
Spline interpolation is a form of interpolation where the interpolant is a special
type of piecewise polynomial called a spline. Spline interpolation is preferred over
polynomial interpolation because the interpolation error can be minimized. Also,
spline interpolation is better for a higher degree of polynomials because it avoids
Runge's phenomenon ( http://en.wikipedia.org/wiki/Runge's_phenomenon )
found in polynomial interpolation. It is used when the function changes over the
value of x . For example, if x>0 , then f(x)=x 2 , and if x<0 , then f(x)=1/x 2 . Piecewise
polynomial refers to a different function for ranges of x .
Spline interpolation and linear algebra are complex topics. Refer to the link
http://www.vis.uni-stuttgart.de/~kraus/LiveGraphics3D/cagd/ . This web
page contains good Java applets ( Chapter 8 , B-spline Curves on the web page) to
understand spline interpolation.
We are not very interested in spline interpolation but very interested in its specific
type called B-spline interpolation. This is the most used form of interpolation in
tweening. Basically, when we want to generate a curved path, we can use this kind
of interpolation.
B-spline or Basis spline is defined by its order, a set of weighted control points and
a knot vector. The control points determine the shape of the curve. Typically, each
point of the curve is computed by taking a weighted sum of a number of control
points. However, the curve usually does not go through the control point.
P 6
t 7
Q7
P 4
Q6
t 8
P 7
P 5
t 6
P 1
Q5
t 3
t 5
P 0
Q4
P 3
t 4
control point
Q3
knot
P 2
 
Search WWH ::




Custom Search