All Topics  
Spline (mathematics)

 

   Email Print
   Bookmark   Link






 

Spline (mathematics)



 
 
In mathematics
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....
, a spline is a special 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....
 defined 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 ....
 by 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....
s. In interpolating
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....
 problems, spline interpolation
Spline interpolation

In the mathematics field of numerical analysis, spline interpolation is a form of interpolation where the interpolant is a special type of piecewise polynomial called a spline ....
 is often preferred to 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 it yields similar results, even when using low degree polynomials, while avoiding 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....
 for higher degrees.

In the computer science
Computer science

Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
 subfields of computer-aided design
Computer-aided design

Computer-Aided Design is the use of computer technology to aid in the design and particularly the drafting of a part or product, including entire buildings....
 and computer graphics
Computer graphics

Computer graphics are graphics created by computers and, more generally, the representation and manipulation of pictorial data by a computer....
, the term spline more frequently refers to a piecewise polynomial (parametric) curve
Curve

In mathematics, a curve consists of the points through which a continuous function moving point passes. This notion captures the intuitive idea of a geometrical dimension object, which furthermore is connectedness in the sense of having no continuous function or continuum ....
. Splines are popular curves in these subfields because of the simplicity of their construction, their ease and accuracy of evaluation, and their capacity to approximate complex shapes through curve fitting
Curve fitting

Curve fitting is finding a curve which has the best fit to a series of data points and possibly other constraints. This section is an introduction to both interpolation and regression analysis....
 and interactive curve design.

The term spline comes from the flexible spline
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....
 devices used by shipbuilders and draftsmen
Technical drawing

File:Drafter at work.jpgFile:Bundesarchiv B 145 Bild-F038800-0010, Wolfsburg, VW Autowerk.jpgTechnical drawing is the discipline of creating Standardization technology drawing by architects, CAD drafters, design engineers, and related professionals....
 to draw smooth shapes.

Introduction
The term "spline" is used to refer to a wide class of functions that are used in applications requiring data interpolation and/or smoothing.






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



Encyclopedia


In mathematics
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....
, a spline is a special 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....
 defined 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 ....
 by 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....
s. In interpolating
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....
 problems, spline interpolation
Spline interpolation

In the mathematics field of numerical analysis, spline interpolation is a form of interpolation where the interpolant is a special type of piecewise polynomial called a spline ....
 is often preferred to 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 it yields similar results, even when using low degree polynomials, while avoiding 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....
 for higher degrees.

In the computer science
Computer science

Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
 subfields of computer-aided design
Computer-aided design

Computer-Aided Design is the use of computer technology to aid in the design and particularly the drafting of a part or product, including entire buildings....
 and computer graphics
Computer graphics

Computer graphics are graphics created by computers and, more generally, the representation and manipulation of pictorial data by a computer....
, the term spline more frequently refers to a piecewise polynomial (parametric) curve
Curve

In mathematics, a curve consists of the points through which a continuous function moving point passes. This notion captures the intuitive idea of a geometrical dimension object, which furthermore is connectedness in the sense of having no continuous function or continuum ....
. Splines are popular curves in these subfields because of the simplicity of their construction, their ease and accuracy of evaluation, and their capacity to approximate complex shapes through curve fitting
Curve fitting

Curve fitting is finding a curve which has the best fit to a series of data points and possibly other constraints. This section is an introduction to both interpolation and regression analysis....
 and interactive curve design.

The term spline comes from the flexible spline
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....
 devices used by shipbuilders and draftsmen
Technical drawing

File:Drafter at work.jpgFile:Bundesarchiv B 145 Bild-F038800-0010, Wolfsburg, VW Autowerk.jpgTechnical drawing is the discipline of creating Standardization technology drawing by architects, CAD drafters, design engineers, and related professionals....
 to draw smooth shapes.

Introduction


The term "spline" is used to refer to a wide class of functions that are used in applications requiring data interpolation and/or smoothing. The data may be either one-dimensional or multi-dimensional. Spline functions for interpolation are normally determined as the minimizers of suitable measures of roughness (for example integral squared curvature) subject to the interpolation constraints. Smoothing splines may be viewed as generalizations of interpolation splines where the functions are determined to minimize a weighted combination of the average squared approximation error over observed data and the roughness measure. For a number of meaningful definitions of the roughness measure, the spline functions are found to be finite dimensional in nature, which is the primary reason for their utility in computations and representation. For the rest of this section, we focus entirely on one-dimensional, polynomial splines and use the term "spline" in this restricted sense.

Definition

We begin by limiting our discussion to the univariate
Univariate

In mathematics, univariate refers to an expression , equation, function or polynomial of only one variable. Objects of any of these types but involving more than one variable may be called multivariate....
 polynomial case. In this case, a spline is a 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....
 function
Function

Function may refer to:* Function , explaining why a feature survived selection* Function , an abstract entity that associates an input to a corresponding output according to some rule...
. This function, call it S, takes values from an interval [a,b] and maps them to , the set of real numbers,
We want S to be piecewise defined. To accomplish this, let the interval [a,b] be covered by k ordered, disjoint
Disjoint

Disjoint may refer to:*Disjoint sets*Disjoint union...
 subintervals, On each of these k "pieces" of [a,b], we want to define a polynomial, call it Pi.
. On the ith subinterval of [a,b], S is defined by Pi,

The given k points ti are called knots. The vector is called a knot vector for the spline. If the knots are equidistantly distributed in the interval [a,b] we say the spline is uniform, otherwise we say it is non-uniform.

If the polynomial pieces on the subintervals all have degree at most n, then the spline is said to be of degree (or of order n+1).

If in a neighborhood of ti, then the spline is said to be of smoothness
Smooth function

In mathematical analysis, a differentiability class is a classification of function according to the properties of their derivatives. Higher order differentiability classes correspond to the existence of more derivatives....
 (at least) at ti. That is, at ti the two pieces Pi-1 and Pi share common derivative values from the derivative of order 0 (the function value) up through the derivative of order ri (in other words, the two adjacent polynomial pieces connect with loss of smoothness of at most n - ri).

A vector such that the spline has smoothness at ti for 0 < i < k - 1 is called a smoothness vector for the spline.

Given a knot vector , a degree n, and a smoothness vector for , one can consider the set of all splines of degree having knot vector and smoothness vector . Equipped with the operation of adding two functions (pointwise addition) and taking real multiples of functions, this set becomes a real vector space. This spline space is commonly denoted by .

In the mathematical study of polynomial splines the question of what happens when two knots, say ti and ti+1, are moved together has an easy answer. The polynomial piece Pi(t) disappears, and the pieces Pi-1(t) and Pi+1(t) join with the sum of the continuity losses for ti and ti+1. That is, This leads to a more general understanding of a knot vector. The continuity loss at any point can be considered to be the result of multiple knots located at that point, and a spline type can be completely characterized by its degree n and its extended knot vector

where ti is repeated ji times for .

A parametric curve on the interval [a,b] is a spline curve if both X and Y are spline functions of the same degree with the same extended knot vectors on that interval.

Examples

Suppose the interval [a,b] is [0,3] and the subintervals are [0,1], [1,2], and [2,3]. Suppose the polynomial pieces are to be of degree 2, and the pieces on [0,1] and [1,2] must join in value and first derivative (at t=1) while the pieces on [1,2] and [2,3] join simply in value (at t = 2). This would define a type of spline S(t) for which would be a member of that type, and also would be a member of that type. (Note: while the polynomial piece 2t is not quadratic, the result is still called a quadratic spline. This demonstrates that the degree of a spline is the maximum degree of its polynomial parts.) The extended knot vector for this type of spline would be (0, 1, 2, 2, 3).

The simplest spline has degree 0. It is also called a step function
Step function

In mathematics, a function on the real numbers is called a step function if it can be written as a finite set linear combination of indicator functions of interval s....
. The next most simple spline has degree 1. It is also called a linear spline. A closed linear spline (i.e, the first knot and the last are the same) in the plane is just 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 ....
.

A common spline is the natural cubic spline of degree 3 with continuity C2. The word "natural" means that the second derivatives of the spline polynomials are set equal to zero at the endpoints of the interval of interpolation

This forces the spline to be a straight line outside of the interval, while not disrupting its smoothness.

Algorithm for computing natural cubic splines


Cubic splines are of the form .
Given set of coordinates we wish to find set of n - 1 splines such that , , and .

Let us define one cubic spline S as a 5-tuple where a, b, c and d correspond to coefficients in the form shown earlier and xt is equal to xj.

Algorithm for computing Natural Cubic Splines:
Input: set of coordinates C, integer n =
Output: set splines which is composed of n - 1 5-tuples.
  1. Create new array a of size n and for i = 0, 1, ..., n - 1 set ai = yi.
  2. Create new arrays b, c and d each of size n.
  3. Create new array h of size n - 1 and for i = 0, 1, ..., n - 2 set hi = xi+1 - xi.
  4. Create new array a of size n - 2 and for i = 1, 2, ..., n - 2 set .
  5. Create new arrays l, µ, and z each of size n.
  6. Set l0 = 1; µ0 = z0 = 0.
  7. For i = 1, 2, 3, ..., n - 2
    1. Set .
    2. Set .
    3. Set .
  8. Set ln-1 = 1; zn-1 = cn-1 = 0.
  9. For j = n - 2, n - 3, ..., 0
    1. Set cj = zj - µjcj+1
    2. Set
    3. Set
  10. Create new set Splines and call it output_set. Populate it with n - 1 splines S.
  11. For i = 0, 1, 2, ..., n - 2
    1. Set Si,a = ai
    2. Set Si,b = bi
    3. Set Si,c = ci
    4. Set Si,d = di
    5. Set Si,x = xi
  12. Output output_set


General Expression For a C2 Interpolating Cubic Spline


The general expression for the ith C2 interpolating cubic spline at a point x with the natural condition can be found using the formula

where
  • are the values of the second derivative at the ith knot.
  • are the values of the function at the ith knot.


Representations and Names

For a given interval [a,b] and a given extended knot vector on that interval, the splines of degree n form a vector space
Vector space

File:Vector addition ans scaling.pngA vector space is a mathematical structure formed by a collection of vectors: objects that may be Vector addition together and Scalar multiplication by numbers, called scalar s in this context....
. Briefly this means that adding any two splines of a given type produces spline of that given type, and multiplying a spline of a given type by any constant produces a spline of that given type. The dimension of the space containing all splines of a certain type can be counted from the extended knot vector:

The dimension is equal to the sum of the degree plus the multiplicities If a type of spline has additional linear conditions imposed upon it, then the resulting spline will lie in a subspace. The space of all natural cubic splines, for instance, is a subspace of the space of all cubic C2 splines.

The literature of splines is replete with names for special types of splines. These names have been associated with:
  • The choices made for representing the spline, for example:
    • using basis
      Basis (linear algebra)

      In linear algebra, a basis is a set of vectors that, in a linear combination, can represent every vector in a given vector space or free module, and such that no element of the set can be represented as a linear combination of the others....
       functions for the entire spline (giving us the name B-spline
      B-spline

      In the mathematics subfield of numerical analysis, a B-spline is a spline function that has minimal Support with respect to a given Degree of a polynomial, Smooth function, and Domain partition....
      s)
    • using Bernstein polynomial
      Bernstein polynomial

      In the mathematics field of numerical analysis, a Bernstein polynomial, named after Sergei Natanovich Bernstein, is a polynomial in the Bernstein form, that is a linear combination of Bernstein basis polynomials....
      s as employed by Pierre Bézier to represent each polynomial piece (giving us the name Bézier spline
      Bézier spline

      In the mathematics field of numerical analysis and in computer graphics a B?zier spline is a spline curve where each polynomial of the spline is in B?zier form....
      s)
  • The choices made in forming the extended knot vector, for example:
    • using single knots for Cn-1 continuity and spacing these knots evenly on [a,b] (giving us uniform splines)
    • using knots with no restriction on spacing (giving us nonuniform splines)
  • Any special conditions imposed on the spline, for example:
    • enforcing zero second derivatives at a and b (giving us natural splines)
    • requiring that given data values be on the spline (giving us interpolating splines)
Often a special name was chosen for a type of spline satisfying two or more of the main items above. For example, the Hermite spline
Hermite spline

In the mathematics subfield of numerical analysis, a Hermite spline is a spline curve where each polynomial of the spline is in Hermite form....
 is a spline that is expressed using Hermite polynomials to represent each of the individual polynomial pieces. These are most often used with n = 3; that is, as 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....
s. In this degree they may additionally be chosen to be only tangent-continuous (C1); which implies that all interior knots are double. Several methods have been invented to fit such splines to given data points; that is, to make them into interpolating splines, and to do so by estimating plausible tangent values where each two polynomial pieces meet (giving us Cardinal splines, Catmull-Rom splines, and Kochanek-Bartels spline
Kochanek-Bartels spline

In mathematics, a Kochanek-Bartels spline or Kochanek-Bartels curve is a cubic Hermite spline with tension, bias, and continuity parameters defined to change the behavior of the tangents....
s, depending on the method used).

For each of the representations, some means of evaluation must be found so that values of the spline can be produced on demand. For those representations that express each individual polynomial piece Pi(t) in terms of some basis for the degree n polynomials, this is conceptually straightforward:
  • For a given value of the argument t, find the interval in which it lies
  • Look up the polynomial basis chosen for that interval
  • Find the value of each basis polynomial at t:
  • Look up the coefficients of the linear combination of those basis polynomials that give the spline on that interval c0, ..., ck-2
  • Add up that linear combination of basis polynomial values to get the value of the spline at t:
However, the evaluation and summation steps are often combined in clever ways. For example, Bernstein polynomials are a basis for polynomials that can be evaluated in linear combinations efficiently using special recurrence relations. This is the essence of De Casteljau's algorithm
De Casteljau's algorithm

In the mathematics subfield of numerical analysis the de Casteljau's algorithm, named after its inventor Paul de Casteljau, is a Recursion method to evaluate polynomials in Bernstein form or B?zier curves....
, which features in Bézier curve
Bézier curve

In the mathematics field of numerical analysis, a B?zier curve is a parametric curve important in computer graphics and related fields.Generalizations of B?zier curves to higher dimensions are called B?zier surfaces, of which the B?zier triangle is a special case....
s and Bézier spline
Bézier spline

In the mathematics field of numerical analysis and in computer graphics a B?zier spline is a spline curve where each polynomial of the spline is in B?zier form....
s.

For a representation that defines a spline as a linear combination of basis splines, however, something more sophisticated is needed. The de Boor algorithm is an efficient method for evaluating B-spline
B-spline

In the mathematics subfield of numerical analysis, a B-spline is a spline function that has minimal Support with respect to a given Degree of a polynomial, Smooth function, and Domain partition....
s.

History

Before computers were used, numerical calculations were done by hand. Although piecewise-defined functions like the sign function
Sign function

In mathematics, the sign function is an Even and odd functions function that extracts the negative and non-negative numbers of a real number....
 or step function
Step function

In mathematics, a function on the real numbers is called a step function if it can be written as a finite set linear combination of indicator functions of interval s....
 were used, polynomials were generally preferred because they were easier to work with. Through the advent of computers splines have gained importance. They were first used as a replacement for polynomials in interpolation, then as a tool to construct smooth and flexible shapes in computer graphics.

It is commonly accepted that the first mathematical reference to splines is the 1946 paper by Schoenberg
Isaac Jacob Schoenberg

File:SchoenbergIJ.jpegIsaac Jacob Schoenberg was a Romanian-United States mathematician, known for his discovery of Spline .He studied at the University of Iasi, receiving his M.A....
, which is probably the first place that the word "spline" is used in connection with smooth, piecewise polynomial approximation. However, the ideas have their roots in the aircraft and shipbuilding industries. In the foreword to (Bartels et al., 1987), Robin Forrest describes "lofting
Lofting

Lofting is a Drafting technique whereby curved lines are drawn on wood and the wood then cut for advanced woodworking. The technique can be as simple as bending a flexible object so that it passes over three non-linear points and scribing the resultant curved line, or plotting the line using computers or mathematical tables....
", a technique used in the British aircraft industry during World War II
World War II

World War II, or the Second World War , was a global military conflict which involved a Participants in World War II, including all of the great powers, organised into two opposing military alliances: the Allies of World War II and the Axis powers....
 to construct templates for airplanes by passing thin wooden strips (called "spline
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....
s") through points laid out on the floor of a large design loft, a technique borrowed from ship-hull design. For years the practice of ship design had employed models to design in the small. The successful design was then plotted on graph paper and the key points of the plot were re-plotted on larger graph paper to full size. The thin wooden strips provided an interpolation of the key points into smooth curves. The strips would be held in place at discrete points (called "ducks" by Forrest; Schoenberg used "dogs" or "rats") and between these points would assume shapes of minimum strain energy. According to Forrest, one possible impetus for a mathematical model for this process was the potential loss of the critical design components for an entire aircraft should the loft be hit by an enemy bomb. This gave rise to "conic lofting", which used conic sections to model the position of the curve between the ducks. Conic lofting was replaced by what we would call splines in the early 1960s based on work by J. C. Ferguson at Boeing
Boeing

The Boeing Company is a major aerospace and defense corporation, originally founded by William Edward Boeing in Seattle, Washington. Boeing has expanded over the years, merging with McDonnell Douglas in 1997....
 and (somewhat later) by M.A. Sabin at British Aircraft Corporation
British Aircraft Corporation

The British Aircraft Corporation was a United Kingdom aircraft manufacturer formed from the government-pressured merger of English Electric, Vickers-Armstrong, the Bristol Aeroplane Company and Hunting Aircraft in 1960....
.

The word "spline" was originally an East Anglian
East Anglian English

Sorry, no overview for this topic
 dialect word.

The use of splines for modeling automobile bodies seems to have several independent beginnings. Credit is claimed on behalf of de Casteljau
Paul de Casteljau

'Paul de Casteljau' , a physicist and mathematician at Citro?n, developed an algorithm for computation of a B?zier curve, in 1959.Author of the book Math?matiques et CAO....
 at Citroën
Citroën

Citro?n is a France automobile manufacturer, founded in 1919 by Andr? Citro?n, it was the world's first mass-production car company outside of the USA....
, Pierre Bézier
Pierre Bézier

Pierre ?tienne B?zier was a France engineer and patentor of the B?zier curves and B?zier surfaces that are now used in most computer-aided design and computer graphics systems....
 at Renault
Renault

Renault S.A. is a French automaker producing cars, vans, buses, tractors, and trucks. Due to its alliance with Nissan Motor Co., Ltd., it is currently the world's 4th largest automaker.It owns the Romanian automaker Dacia and the Korean automaker Renault Samsung Motors....
, and Birkhoff
Garrett Birkhoff

Garrett Birkhoff was an United States mathematician.The mathematician George Birkhoff was his father....
, Garabedian, and de Boor
Carl R. de Boor

Carl R. de Boor is a German-American mathematician and professor emeritus at the University of Wisconsin-Madison....
 at General Motors (see Birkhoff and de Boor, 1965), all for work occurring in the very early 1960s or late 1950s. At least one of de Casteljau's papers was published, but not widely, in 1959. De Boor's work at GM resulted in a number of papers being published in the early 1960s, including some of the fundamental work on B-spline
B-spline

In the mathematics subfield of numerical analysis, a B-spline is a spline function that has minimal Support with respect to a given Degree of a polynomial, Smooth function, and Domain partition....
s.

Work was also being done at Pratt & Whitney Aircraft, where two of the authors of (Ahlberg et al., 1967) — the first book-length treatment of splines — were employed, and the David Taylor Model Basin
David Taylor Model Basin

The David Taylor Model Basin is one of the largest ship model basins — test facilities for the development of ship design — in the world....
, by Feodor Theilheimer. The work at GM is detailed nicely in (Birkhoff, 1990) and (Young, 1997). Davis (1997) summarizes some of this material.

External links


Theory
  • Prof. John H. Mathews California State University, Fullerton
    California State University, Fullerton

    California State University, Fullerton, commonly known as CSUF, CSU Fullerton, or Cal State Fullerton, is currently the second largest California State University campus....
  • , ibiblio.org


Online utilities
  • Interactive simulation of various cubic splines
  • , an animation by Theodore Gray
    Theodore Gray

    Theodore W. Gray is one of the founders of Wolfram Research and is currently Wolfram's Director of User Interface Technology.He created a wooden periodic table with compartments for each of the elements....
    , The Wolfram Demonstrations Project, 2007.


Computer Code
  • , Holistic Numerical Methods Institute
  • , NTCC
  • , SINTEF
  • , vbnumericalmethods.com