Cubic Spline - From Wolfram MathWorld

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Cubic Spline -- from Wolfram MathWorld http://mathworld.wolfram.com/CubicSpline.

html

SEARCH MATHWORLD

Cubic Spline in the


Algebra
Applied Mathematics > Numerical Methods > Approximation Theory > Interpolation >
Applied Mathematics Interactive Entries > Interactive Demonstrations >
Calculus and Analysis
Discrete Mathematics
Foundations of Mathematics
Geometry
Cubic Spline Random Spline Polygon

History and Terminology


Number Theory
Probability and Statistics
Interactive Spline
Recreational Mathematics
Topology

Alphabetical Index
Interactive Entries
Random Entry
New in MathWorld

MathWorld Classroom

About MathWorld A cubic spline is a spline constructed of piecewise third-order polynomials


Contribute to MathWorld which pass through a set of control points. The second derivative of each
Send a Message to the Team
polynomial is commonly set to zero at the endpoints, since this provides a Other Wolfram Web Resources »
MathWorld Book boundary condition that completes the system of equations. This
produces a so-called "natural" cubic spline and leads to a simple tridiagonal
13,067 entries system which can be solved easily to give the coefficients of the
Last updated: Wed May 18 2011
polynomials. However, this choice is not the only one possible, and other
boundary conditions can be used instead.

Cubic splines are implemented in Mathematica as BSplineCurve[pts,


SplineDegree -> 3].

Consider 1-dimensional spline for a set of points .


Following Bartels et al. (1998, pp. 10-13), let the th piece of the spline be
represented by

(1)

where is a parameter and , ..., . Then

(2)
(3)

Taking the derivative of in each interval then gives

(4)
(5)

Solving (2)-(5) for , , , and then gives

(6)
(7)
(8)
(9)

Now require that the second derivatives also match at the points, so

(10)
(11)
(12)
(13)

for interior points, as well as that the endpoints satisfy

(14)
(15)

This gives a total of equations for the unknowns.


To obtain two more conditions, require that the second derivatives at the
endpoints be zero, so

(16)
(17)

Rearranging all these equations (Bartels et al. 1998, pp. 12-13) leads to the
following beautifully symmetric tridiagonal system

1 of 2 24.5.2011 9:11
Cubic Spline -- from Wolfram MathWorld http://mathworld.wolfram.com/CubicSpline.html

(18)

If the curve is instead closed, the system becomes

(19)

SEE ALSO: Bézier Curve, Spline, Thin Plate Spline

REFERENCES:

Bartels, R. H.; Beatty, J. C.; and Barsky, B. A. "Hermite and Cubic Spline Interpolation." Ch. 3
in An Introduction to Splines for Use in Computer Graphics and Geometric Modelling. San
Francisco, CA: Morgan Kaufmann, pp. 9-17, 1998.

Burden, R. L.; Faires, J. D.; and Reynolds, A. C. Numerical Analysis, 6th ed. Boston, MA:
Brooks/Cole, pp. 120-121, 1997.

Press, W. H.; Flannery, B. P.; Teukolsky, S. A.; and Vetterling, W. T. "Cubic Spline
Interpolation." §3.3 in Numerical Recipes in FORTRAN: The Art of Scientific Computing, 2nd
ed. Cambridge, England: Cambridge University Press, pp. 107-110, 1992.

CITE THIS AS:

Weisstein, Eric W. "Cubic Spline." From MathWorld--A Wolfram Web Resource.


http://mathworld.wolfram.com/CubicSpline.html

Contact the MathWorld Team


© 1999-2011 Wolfram Research, Inc. | Terms of Use

2 of 2 24.5.2011 9:11

You might also like