All Topics  
Spline interpolation

 

   Email Print
   Bookmark   Link






 

Spline interpolation



 
 
In the mathematical
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
 field of numerical analysis
Numerical analysis

Numerical analysis is the study of algorithms for the problems of continuous mathematics .One of the earliest mathematical writings is the Babylonian tablet YBC 7289, which gives a sexagesimal numerical approximation of , the length of the diagonal in a unit square....
, spline interpolation is a form of interpolation
Interpolation

In the mathematics subfield of numerical analysis, interpolation is a method of constructing new data points within the range of a discrete set of known data points....
 where the interpolant is a special type of piecewise
Piecewise

In mathematics, a piecewise-defined function is a function whose definition is dependent on the value of the independent variable. Mathematically, a real number-valued function f of a real variable x is a relationship whose definition is given differently on disjoint subsets of its domain ....
 polynomial
Polynomial

In mathematics, a polynomial is an expression constructed from variables and constants, using the operations of addition, subtraction, multiplication, and constant non-negative whole number exponents....
 called a spline
Spline (mathematics)

In mathematics, a spline is a special Function defined piecewise by polynomials.In interpolation problems, spline interpolation is often preferred to polynomial interpolation because it yields similar results, even when using low degree polynomials, while avoiding Runge's phenomenon for higher degrees....
. Spline interpolation is preferred over polynomial interpolation
Polynomial interpolation

In the mathematics subfield of numerical analysis, polynomial interpolation is the interpolation of a given data set by a polynomial. In other words, given some data points , the aim is to find a polynomial which goes exactly through these points....
 because the interpolation error can be made small even when using low degree polynomials for the spline. Thus, spline interpolation avoids the problem of Runge's phenomenon
Runge's phenomenon

In the mathematics field of numerical analysis, Runge's phenomenon is a problem that occurs when using polynomial interpolation with polynomials of high degree....
 which occurs when using high degree polynomials.

n+1 knot values yi we are trying to find a spline function
Function (mathematics)

The mathematical concept of a function expresses dependence between two quantities, one of which is known and the other which is produced. A function associates a single output to each input element drawn from a fixed Set , such as the real numbers , although different inputs may have the same output....
 of degree n

where each Si(x) is a polynomial of degree k.

Spline interpolant
Using polynomial interpolation, the polynomial of degree n which interpolates the data set
Data set

A data set is a collection of data, usually presented in tabular form. Each column represents a particular variable. Each row corresponds to a given member of the data set in question....
 is uniquely defined by the data points.






Discussion
Ask a question about 'Spline interpolation'
Start a new discussion about 'Spline interpolation'
Answer questions from other users
Full Discussion Forum



Encyclopedia


In the mathematical
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
 field of numerical analysis
Numerical analysis

Numerical analysis is the study of algorithms for the problems of continuous mathematics .One of the earliest mathematical writings is the Babylonian tablet YBC 7289, which gives a sexagesimal numerical approximation of , the length of the diagonal in a unit square....
, spline interpolation is a form of interpolation
Interpolation

In the mathematics subfield of numerical analysis, interpolation is a method of constructing new data points within the range of a discrete set of known data points....
 where the interpolant is a special type of piecewise
Piecewise

In mathematics, a piecewise-defined function is a function whose definition is dependent on the value of the independent variable. Mathematically, a real number-valued function f of a real variable x is a relationship whose definition is given differently on disjoint subsets of its domain ....
 polynomial
Polynomial

In mathematics, a polynomial is an expression constructed from variables and constants, using the operations of addition, subtraction, multiplication, and constant non-negative whole number exponents....
 called a spline
Spline (mathematics)

In mathematics, a spline is a special Function defined piecewise by polynomials.In interpolation problems, spline interpolation is often preferred to polynomial interpolation because it yields similar results, even when using low degree polynomials, while avoiding Runge's phenomenon for higher degrees....
. Spline interpolation is preferred over polynomial interpolation
Polynomial interpolation

In the mathematics subfield of numerical analysis, polynomial interpolation is the interpolation of a given data set by a polynomial. In other words, given some data points , the aim is to find a polynomial which goes exactly through these points....
 because the interpolation error can be made small even when using low degree polynomials for the spline. Thus, spline interpolation avoids the problem of Runge's phenomenon
Runge's phenomenon

In the mathematics field of numerical analysis, Runge's phenomenon is a problem that occurs when using polynomial interpolation with polynomials of high degree....
 which occurs when using high degree polynomials.

Definition


Given n+1 distinct knots xi such that

with n+1 knot values yi we are trying to find a spline function
Function (mathematics)

The mathematical concept of a function expresses dependence between two quantities, one of which is known and the other which is produced. A function associates a single output to each input element drawn from a fixed Set , such as the real numbers , although different inputs may have the same output....
 of degree n

where each Si(x) is a polynomial of degree k.

Spline interpolant


Using polynomial interpolation, the polynomial of degree n which interpolates the data set
Data set

A data set is a collection of data, usually presented in tabular form. Each column represents a particular variable. Each row corresponds to a given member of the data set in question....
 is uniquely defined by the data points. The spline of degree n which interpolates the same data set is not uniquely defined, and we have to fill in n-1 additional degrees of freedom
Degrees of freedom (physics and chemistry)

Degrees of freedom is a general term used in explaining dependence on parameters, and implying the possibility of counting the number of those parameters....
 to construct a unique spline interpolant.

Linear spline interpolation


Linear spline interpolation is the simplest form of spline interpolation and is equivalent to linear interpolation
Linear interpolation

Linear interpolation is a method of curve fitting using linear polynomials. It is heavily employed in mathematics , and numerous applications including computer graphics....
. The data points are graphically connected by straight lines. The resultant spline would be a polygon
Polygon

In geometry a polygon is traditionally a plane Shape that is bounded by a closed curve path or circuit, composed of a finite sequence of straight line segments ....
 if the end point is connected to the beginning point.

Algebraically, each Si is a linear function
Linear function

In mathematics, the term linear function can refer to either of two different but related concepts: a first-degree polynomial function of one variable; or a map between two vector spaces that preserves vector addition and scalar multiplication....
 constructed as

The spline must be continuous at each data point, that is

This is the case as we can easily see

Quadratic spline interpolation


The quadratic spline can be constructed as

The coefficients can be found by choosing a z0 and then using the recurrence relation
Recurrence relation

In mathematics, a recurrence relation is an equation that defines a sequence recursion: each term of the sequence is defined as a Function of the preceding terms....
:

The coefficients z above are basically a running derivative approximation. Since only two points are used to calculate the next iteration's curve (instead of three), this method is susceptible to severe oscillation effects when signal change is quickly followed by a steady signal. Without some sort of dampening, these oscillation effects make the above method a poor choice.

A more stable alternative to this method is a cubic spline passing through the middle points of the original data instead. To calculate Si(x) first select a j such that xj-1 < x < xj+1 and that |xj-1 - x| + |xj+1 - x| is minimized. Then, find a, b, c and d of S(x) = ax3 + bx2 + cx + d such that:

In effect, this yields a set of curves that are continuous in the first degree, highly stable (i.e. aren't subject to oscillation effects) and does not require huge matrix solving.

Cubic spline interpolation

For a data set of n+1 points, we can construct a cubic spline with n piecewise cubic polynomials between the data points. If represents the spline function interpolating the function f, we require:
  • the interpolating property, S(xi)=f(xi)
  • the splines to join up, Si-1(xi) = Si(xi), i=1,...,n-1
  • twice continuous differentiable, S'i-1(xi) = S'i(xi) and Si-1(xi) = Si(xi), i=1,...,n-1.


For the n cubic polynomials comprising S, this means to determine these polynomials, we need to determine 4n conditions (since for one polynomial of degree three, there are four conditions on choosing the curve). However, the interpolating property gives us n + 1 conditions, and the conditions on the interior data points give us n + 1 − 2 = n − 1 data points each, summing to 4n − 2 conditions. We require two other conditions, and these can be imposed upon the problem for different reasons.

One such choice results in the so-called clamped cubic spline, with for given values u and v.

Alternately, we can set

. resulting in the natural cubic spline. The natural cubic spline is approximately the same curve as created by the spline device
Flat spline

A spline consists of a long strip fixed in position at a number of points that relaxes to form a smooth curve passing through those points.Before computers were used for computer-aided design, Technical drawing were employed by designers drawing by hand....
.

Amongst all twice continuously differentiable functions, clamped and natural cubic splines yield the least oscillation about the function f which is interpolated.

Another choice gives the periodic cubic spline if

Another choice gives the complete cubic spline if

Minimality of the cubic splines

The cubic spline has a very important variational interpretation, in fact it is the function that minimizes the functional , over the functions in the Sobolev space
Sobolev space

In mathematics, a Sobolev space is a vector space of functions equipped with a normed space that is a combination of Lp norm of the function itself as well as its derivatives up to a given order....
 .

The functional contains an approximation of the total curvature
Curvature

In mathematics, curvature refers to any of a number of loosely related concepts in different areas of geometry. Intuitively, curvature is the amount by which a geometric object deviates from being flat, or straight in the case of a line , but this is defined in different ways depending on the context....
  of the graph of and then the spline is the approximation of with minimal curvature. It is also aesthetically
Aesthetics

Aesthetics or esthetics is commonly known as the study of senses or sensori-emotional values, sometimes called judgments of sentiment and taste ....
 pleasing.

Since the total energy of an elastic strip is proportional to the curvature, the spline is the configuration of minimal energy of an elastic strip constrained to points. A spline is also an instrument to design based on an elastic strip.

Interpolation using natural cubic spline


It can be defined as

and

.

The coefficients can be found by solving this system of equations:

Example


Linear spline interpolation


Consider the problem of finding a linear spline for with the following knots

After directly applying the spline formula, we get the following spline

The spline function (blue lines) and the function it is approximating (red dashes) are graphed below:

Linearspline

See also

  • Cubic Hermite spline
    Cubic Hermite spline

    In the mathematics subfield of numerical analysis a cubic Hermite spline , named in honor of Charles Hermite, is a third-degree spline with each polynomial of the spline in Hermite form....
  • Monotone cubic interpolation
    Monotone cubic interpolation

    In the mathematics subfield of numerical analysis, monotone cubic interpolation is a variant of cubic interpolation that preserves Monotone function of the data set being interpolated....
  • NURBS


External links