Hubbry Logo
Spline (mathematics)Spline (mathematics)Main
Open search
Spline (mathematics)
Community hub
Spline (mathematics)
logo
8 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Spline (mathematics)
Spline (mathematics)
from Wikipedia
Single knots at 1/3 and 2/3 establish a spline of three cubic polynomials meeting with C2 parametric continuity. Triple knots at both ends of the interval ensure that the curve interpolates the end points

In mathematics, a spline is a function defined piecewise by polynomials. In interpolating 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.

In the computer science subfields of computer-aided design and computer graphics, the term spline more frequently refers to a piecewise polynomial (parametric) curve. 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 and interactive curve design.

The term spline comes from the flexible spline devices used by shipbuilders and draftsmen to draw smooth shapes.

Introduction

[edit]

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.

History

[edit]

According to Gerald Farin, B-splines were explored as early as the nineteenth century by Nikolai Lobachevsky at Kazan University in Russia.[1]

Before computers were used, numerical calculations were done by hand. Although piecewise-defined functions like the sign function or step function 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, 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", a technique used in the British aircraft industry during World War II to construct templates for airplanes by passing thin wooden strips (called "splines") 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 and (somewhat later) by M.A. Sabin at British Aircraft Corporation.

The word "spline" was originally an East Anglian dialect word.

The use of splines for modeling automobile bodies seems to have several independent beginnings. Credit is claimed on behalf of de Casteljau at Citroën, Pierre Bézier at Renault, and Birkhoff, Garabedian, and de Boor 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 General Motors resulted in a number of papers being published in the early 1960s, including some of the fundamental work on B-splines.

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, by Feodor Theilheimer. The work at General Motors is detailed nicely in (Birkhoff, 1990) and (Young, 1997). Davis (1997) summarizes some of this material.

Definition

[edit]

We begin by limiting our discussion to polynomials in one variable. In this case, a spline is a piecewise polynomial function. 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 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 + 1 points ti are called knots. The vector t = (t0, …, tk) 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 Pi each have degree at most n, then the spline is said to be of degree n (or of order n + 1).

If in a neighborhood of ti, then the spline is said to be of smoothness (at least) at ti. That is, at ti the two polynomial 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 nri)

A vector r = (r1, …, rk–1) such that the spline has smoothness at ti for i = 1, …, k – 1 is called a smoothness vector for the spline.

Given a knot vector t, a degree n, and a smoothness vector r for t, one can consider the set of all splines of degree n having knot vector t and smoothness vector r. 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 taken to approach one another and become coincident 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 smoothness losses for ti and ti+1. That is, where ji = nri. 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 i = 1, …, k – 1.

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

[edit]

Suppose the interval [a, b] is [0, 3] and the subintervals are [0, 1], [1, 2], [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. 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.

A common spline is the natural cubic spline. A cubic spline has degree 3 with continuity C2, i.e. the values and first and second derivatives are continuous. Natural means that the second derivatives of the spline polynomials are zero at the endpoints of the interval of interpolation.

Thus, the graph of the spline is a straight line outside of the interval, but still smooth.

Notes

[edit]

General expression for a C2 interpolating cubic spline

[edit]

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

[edit]

For a given interval [a,b] and a given extended knot vector on that interval, the splines of degree n form a vector space. 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:
  • 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 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 splines. 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 splines, 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, which features in Bézier curves and Bézier splines).

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-splines.

References

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
In , a spline is a piecewise function that provides a smooth approximation or of data, consisting of low-degree polynomials joined at specified points called knots, with continuity in the function value and its derivatives up to a specified order at those knots. This structure allows splines to produce flexible, visually smooth curves while maintaining computational efficiency, mimicking the behavior of physical splines—thin, flexible strips used by draftsmen to draw fair curves through points. Splines are fundamental in for approximating functions with minimal error and controlled smoothness. The concept of spline functions was formalized by mathematician I. J. Schoenberg in the mid-20th century, who coined the term in reference to piecewise polynomials and introduced their use for problems, beginning with his 1946 work on cardinal splines. Earlier foundations trace to the 1930s, with recurrence relations for basis splines appearing in works by T. Popoviciu and N. M. Chakalov, though these were not explicitly termed splines at the time. Practical computational methods advanced in the through contributions from researchers like Carl de Boor, driven by needs in (CAD) for the and automotive industries, where splines enabled precise modeling of complex shapes. Key properties of splines include their local support—changes in one segment minimally affect distant parts—and the ability to achieve high-order smoothness without global high-degree polynomials, reducing oscillations like those in standard (e.g., ). B-splines, a particularly stable basis for representing splines, are defined recursively, non-negative, and partition unity, making them ideal for and efficient evaluation. Common variants include cubic splines (degree 3, with C² continuity), which balance smoothness and simplicity, and are piecewise cubics ensuring the second derivative is continuous at knots. Splines find broad applications across fields: in statistics for and data smoothing to estimate underlying trends without assuming a parametric form; in and for representing curves and surfaces in CAD software, enabling design of fuselages and bodies; and in numerical methods for solving differential equations or optimizing trajectories, such as in simulations. Their versatility stems from the ability to adapt knot placement for localized refinement, supporting both exact at data points and approximate fitting with regularization.

Historical Context

Early Development

The term "spline" derives from the flexible wooden or metal strips employed by draftsmen and shipbuilders in the 18th and 19th centuries to draw smooth curves that passed through predetermined points, ensuring fair lines essential for structural integrity. These physical devices, often weighted with lead to maintain tension, originated in East Anglian shipyards where used them to outline hull contours, avoiding abrupt changes that could compromise seaworthiness. By the mid-19th century, such splines had become standard tools in , with the earliest documented reference appearing in H.L. Duhamel du Monceau’s 1752 work Eléments de l’Architecture Navale, describing their use in . Mathematical interest in piecewise polynomial approximations began in the , as scholars sought methods to data tables more reliably than single high-degree . Leonhard Euler advanced this area through his work on formulas in the 1760s and 1770s, developing techniques for local in astronomical and navigational computations that implicitly favored segmented approaches over global fits. These efforts highlighted the practical value of breaking approximations into simpler segments to mitigate errors in large datasets, influencing subsequent developments in . In the 1930s, mathematicians such as Tiberiu Popoviciu and Nikolaï Mihaylov Chakalov developed recurrence relations for what would later be recognized as basis splines, providing early theoretical groundwork for piecewise polynomial constructions. The drawbacks of uniform gained prominence in the early , exemplified by Carl David Tolmé Runge's 1901 analysis, which revealed severe oscillations near the endpoints of intervals when approximating functions like 1/(1+25x2)1/(1 + 25x^2) with equispaced points—a phenomenon now known as . This underscored the necessity for piecewise constructions to achieve stable approximations over extended domains. These explorations marked a transition from practical tools to theoretical frameworks for smooth . This foundational phase evolved into more rigorous interpolation theory by the 1940s.

Modern Foundations

The modern mathematical foundations of splines emerged in the 1940s as a response to the limitations of global in handling discrete data, particularly in statistical contexts. Isaac Jacob Schoenberg introduced in his 1946 paper, presenting it as a piecewise method that provides localized approximation superior to high-degree polynomials, which often exhibit oscillatory behavior like when fitting equidistant data. This work was motivated by the need for robust data smoothing techniques in statistics, a demand heightened by wartime computational requirements during . Building on this, Schoenberg further developed spline theory in the , focusing on cubic splines as a key class for and . In his paper, he explored and its implications for higher derivatives, establishing foundational results on and error bounds. He also introduced the concept of complete splines, which incorporate specific boundary conditions to ensure global properties like minimal variation, and highlighted their qualities, where they achieve optimal uniform error bounds in certain function spaces. These advancements positioned cubic splines as natural tools for solving variational problems in approximation theory. The 1970s saw significant contributions from Carl de Boor, who advanced the practical and theoretical framework of splines through his work on B-splines and efficient computational methods. De Boor's 1972 paper detailed recursive algorithms for evaluating and manipulating B-splines, enabling stable numerical implementations for curve fitting and enabling the representation of splines as linear combinations of basis functions with local support. Concurrently, Richard Birkhoff contributed to spline approximation theory, particularly through his 1967 study on local spline approximation using moments, which provided insights into convergence and error estimates for spline-based methods in solving differential equations. These developments solidified splines as a cornerstone of numerical analysis. The growing interest in splines during the was catalyzed by dedicated conferences, such as the 1968 Advanced Seminar on Theory and Applications of Spline Functions at the University of Wisconsin, which fostered collaboration among mathematicians and highlighted emerging theorems on uniqueness and stability. This momentum culminated in de Boor's influential 1978 book, A Practical Guide to Splines, which standardized notation, algorithms, and theoretical results, making spline methods accessible for widespread adoption in .

Core Definitions

General Definition

In , a spline of degree kk (equivalently, of order k+1k+1) is a function s(x)s(x) defined on the real line that consists of piecewise , where on each subinterval [ξi,ξi+1)[\xi_i, \xi_{i+1}) of a partition determined by knots ξi\xi_i, s(x)s(x) is a polynomial of degree at most kk, and s(x)s(x) together with its first k1k-1 derivatives are continuous at every knot ξi\xi_i. This construction ensures the spline is sufficiently smooth while allowing flexibility through the choice of polynomial pieces. The partition is specified by a knot vector, an ordered non-decreasing sequence of real numbers {ξ0ξ1ξn}\{\xi_0 \leq \xi_1 \leq \cdots \leq \xi_n\}, where the knots ξi\xi_i may have multiplicities greater than one. The space of all splines of degree kk on this knot vector, denoted Sk,ξS_{k,\xi}, forms a finite-dimensional . For the case of simple knots (all distinct, so n+1n+1 knots define nn intervals), the of Sk,ξS_{k,\xi} is n+k+1n + k + 1. Knot multiplicities influence the local smoothness of the spline: at a knot of multiplicity mm, the continuity is enforced only up to the (km)(k - m)-th , allowing for reduced or even discontinuities in higher derivatives when m>1m > 1. For example, a double knot (m=2m=2) for a cubic spline (k=3k=3) permits a discontinuity in the second at that point while maintaining C1C^1 continuity.

Smoothness Conditions

A spline function of degree kk on an interval [a,b][a, b] with knots tit_i is required to be a piecewise polynomial of degree at most kk on each subinterval [ti,ti+1)[t_i, t_{i+1}), while satisfying global smoothness conditions that ensure continuity of the function and its derivatives up to order k1k-1 across the interior knots. Specifically, for simple interior knots (multiplicity 1), the spline belongs to the space Ck1[a,b]C^{k-1}[a, b], meaning it is continuously differentiable up to order k1k-1 over the entire domain. This smoothness distinguishes splines from general piecewise polynomials, which may lack continuity at knot points, and enables applications requiring differentiable approximations. The at a knot is directly influenced by the knot's multiplicity rr. If a knot has multiplicity r>1r > 1, the order of continuity decreases to CkrC^{k-r} at that point, allowing for reduced such as cusps or corners when r=kr = k. For example, in cubic splines (k=3k=3), a multiplicity of 2 at a yields C1C^1 continuity, preserving first- continuity but permitting a discontinuity in the second , which is useful for modeling features with varying . This control over local via knot multiplicity is a fundamental aspect of spline design in and . The imposed smoothness conditions contribute to key properties of spline bases, such as those used in representations. B-splines of degree kk exhibit local support, meaning each is nonzero only over a finite number of intervals (specifically, k+1k+1 intervals), which limits the influence of control points to local regions. Additionally, the B-spline basis satisfies a property, where the sum of all relevant basis functions equals 1 over any knot span, ensuring affine invariance and properties for the resulting spline curve; these emerge from the continuity enforced by the requirements. In approximation theory, splines of degree kk with the Ck1C^{k-1} smoothness condition are elements of Sobolev spaces Wm,p([a,b])W^{m,p}([a,b]) for mkm \leq k, where they provide optimal rates for functions in these spaces. For instance, the error in approximating a function fWk,pf \in W^{k,p} by a spline of degree kk decays as O(hk+1)O(h^{k+1}) in the LpL^p norm, with hh the maximum knot spacing, leveraging the to achieve near-best approximation among piecewise polynomials. This embedding in Sobolev spaces underpins the use of splines in finite element methods and for solving partial differential equations.

Fundamental Properties

Uniqueness and Existence

The spline space Sk,ξS_{k,\xi}, consisting of all functions that are of degree at most kk on each subinterval defined by the knot vector ξ\xi and that belong to the smoothness class CkμjC^{k - \mu_j} at each ξj\xi_j of multiplicity μj\mu_j (with μjk+1\mu_j \leq k+1), exists and is finite-dimensional for any non-decreasing knot vector ξ\xi and positive integer degree kk. This space is non-empty by construction, as it includes all constant functions and can be extended to higher degrees through integration or differentiation operators that preserve the piecewise structure and smoothness properties. A key result establishing the structure of this space is that it admits a basis of BB-splines, which are local, non-negative functions with compact support that sum to 1 () and are linearly independent. This basis spans Sk,ξS_{k,\xi}, guaranteeing its finite dimensionality and providing an explicit means to represent any spline in the space as a of these basis functions. The of the BB-splines ensures that the representation is unique for any given spline. In the context of interpolation, given a set of distinct data points xix_i and values yiy_i for i=0,,ni = 0, \dots, n, there exists a unique spline sSk,ξs \in S_{k,\xi} of degree kk that satisfies s(xi)=yis(x_i) = y_i for all ii, provided the points xix_i are positioned relative to the knots in ξ\xi such that they form a unisolvent set and appropriate end conditions are imposed, such as natural conditions where the second derivative vanishes at the endpoints for k2k \geq 2. The Schoenberg-Whitney theorem supplies the necessary and sufficient condition for this uniqueness: the interpolation points must not lie in the zero set of any nonzero spline in the space, ensuring the collocation matrix is invertible. The proof of existence and uniqueness in this interpolatory setting relies on the basis representation: any interpolant can be expressed as s(x)=cjBj,k(x)s(x) = \sum c_j B_{j,k}(x), where the coefficients cjc_j solve a whose matrix entries are evaluations of the basis at the data points; of the basis and the nonsingularity from the Schoenberg-Whitney condition yield a unique solution. Cases of non-uniqueness arise when boundary conditions are not specified, resulting in an with more than interpolation constraints, or when knots in ξ\xi coincide with data points in a way that violates the separation required by the Schoenberg-Whitney theorem, leading to a singular matrix and either no solution or infinitely many.

Degrees of Freedom

The dimension of the spline space Sk,ξS_{k,\xi}, consisting of piecewise polynomials of degree at most kk that are Ck1C^{k-1} smooth at simple interior s, quantifies the available for constructing such functions over a given configuration ξ\xi. For a partition of the domain into nn subintervals defined by n+1n+1 simple s (including endpoints), the is given by dim(Sk,ξ)=n+k.\dim(S_{k,\xi}) = n + k. This formula arises from the total of n(k+1)n(k+1) coefficients across the nn pieces, minus kk continuity conditions (matching function value through the (k1)(k-1)-th ) at each of the n1n-1 interior s, yielding n(k+1)(n1)k=n+kn(k+1) - (n-1)k = n + k. When interior knots have multiplicities greater than 1, the smoothness at those knots decreases, imposing fewer continuity conditions and thereby increasing the of the . Specifically, compared to the simple knot case, each interior of multiplicity r>1r > 1 increases the by r1r-1, as the general incorporates the sum of multiplicities over interior knots: dim(Sk,ξ)=k+#ti\dim(S_{k,\xi}) = k + \sum \# t_i (in the convention where degree is at most k1k-1, adjusted equivalently for degree kk). For example, a multiplicity of 2 at one interior adds one extra degree of freedom by relaxing one continuity condition. This dimension corresponds to the number of independent coefficients required to uniquely specify any spline in the space, which in practical representations equates to the number of control points needed to define the spline. Unlike a global of degree kk, which has only k+1k+1 and may suffer from global oscillations (as in ), the spline space's n+kn + k enable localized modifications, improving fit to data or design requirements without propagating changes across the entire domain.

Common Types and Examples

Linear and Quadratic Splines

Linear splines, also known as piecewise linear splines of degree 1, are functions composed of linear polynomial pieces joined at specified knots, ensuring continuity across these points, which results in C^0 smoothness overall. They represent the simplest form of , effectively forming continuous broken lines that directly connect given data points without overshooting or oscillating. A representative example is the linear spline interpolating the points (0,0), (1,1), and (2,0) over the interval [0,2] with knots at x=0,1,2. On [0,1], the spline is given by
s(x)=x,s(x) = x,
and on [1,2], by
s(x)=2x.s(x) = 2 - x.
This construction ensures the function passes through all points while maintaining linearity within each subinterval.
Quadratic splines, of degree 2, extend this idea by using piecewise quadratic polynomials that achieve C^1 continuity, meaning both the function and its first are continuous at the knots. This added allows for better of curved data compared to linear splines, though still limited for highly smooth applications. To construct a quadratic spline interpolating data at knots, one approach involves specifying the first derivatives at the knots and solving a tridiagonal derived from the continuity conditions. These methods highlight the computational efficiency of low-degree splines, which require minimal resources but offer only basic smoothness, making them suitable for introductory approximations rather than high-precision .

Cubic Splines

Cubic splines, polynomials of degree 3, are the most widely used type of splines due to their balance of and flexibility in approximating functions. They consist of piecewise cubic polynomials defined over intervals between a set of ξi\xi_i, ensuring continuity up to the second (C² continuity) at each knot. This makes them suitable for applications requiring twice-differentiable curves, such as in and . The general form of a cubic spline segment si(x)s_i(x) on the interval [ξi,ξi+1][\xi_i, \xi_{i+1}] is given by si(x)=ai+bi(xξi)+ci(xξi)2+di(xξi)3,s_i(x) = a_i + b_i (x - \xi_i) + c_i (x - \xi_i)^2 + d_i (x - \xi_i)^3, where the coefficients ai,bi,ci,dia_i, b_i, c_i, d_i are determined to satisfy the continuity conditions and any additional boundary requirements. A key advantage of cubic splines is their approximate local control, where altering a control point influences primarily the nearby segments due to the local coupling in the tridiagonal system, providing a degree of intuitive shape control. For example, a cubic spline can effectively approximate a , producing a smooth that closely follows the target function with minimal oscillations; unlike truncated approximations, which exhibit the near discontinuities in other contexts, splines maintain stability and reduce such artifacts in periodic smooth approximations. This property stems from their piecewise construction, which originated in the analogy to the deflection of an elastic beam under point loads at the knots, as first motivated by Schoenberg in his foundational work on spline .

Interpolation Techniques

Natural and Clamped Splines

In cubic spline interpolation, natural boundary conditions are imposed by setting the second derivatives to zero at the endpoints, that is, s(x0)=0s''(x_0) = 0 and s(xn)=0s''(x_n) = 0. These conditions arise from the variational formulation that minimizes the x0xn[s(x)]2dx\int_{x_0}^{x_n} [s''(x)]^2 \, dx, representing the total or of the interpolant, which physically corresponds to the equilibrium shape of a thin elastic beam constrained to pass through the given points. Consequently, the second derivative is zero at the endpoints, ensuring no at the boundaries themselves, though the spline remains cubic in the end intervals. Clamped boundary conditions, in contrast, specify the first derivatives at the endpoints: s(x0)=m0s'(x_0) = m_0 and s(xn)=mns'(x_n) = m_n, where m0m_0 and mnm_n are prescribed values. This setup is particularly advantageous when the endpoint slopes are known from additional data or context, such as matching the of an underlying function at the boundaries, thereby providing greater control over the interpolant's behavior at the ends compared to natural conditions. To construct either type of spline, the second derivatives Mi=s(xi)M_i = s''(x_i) at the knots xix_i (for i=0,,ni = 0, \dots, n) are determined by solving a tridiagonal derived from the continuity requirements on the first and across intervals, along with the conditions s(xi)=yis(x_i) = y_i. The interior equations (for i=1i = 1 to n1n-1) form the main tridiagonal structure, while the boundary rows are modified accordingly: for natural splines, the conditions M0=0M_0 = 0 and Mn=0M_n = 0 simplify the first and last rows by eliminating the endpoint terms; for clamped splines, the specified slopes m0m_0 and mnm_n introduce additional terms in those rows to incorporate the constraints. Once the MiM_i are obtained, the piecewise cubic form on each interval [xi,xi+1][x_i, x_{i+1}] can be explicitly constructed using incorporating the values, slopes, and second derivatives at the knots. As an illustrative example, consider interpolating the points (0,1)(0, 1), (1,3)(1, 3), and (2,1)(2, 1) with a natural cubic spline. The tridiagonal system yields second derivatives M0=0M_0 = 0, M1=6M_1 = -6, M2=0M_2 = 0, resulting in piecewise cubics with zero second derivative at the endpoints. In comparison, a not-a-knot condition (enforcing third-derivative continuity at the second and penultimate knots) would introduce slight cubic curvature near the boundaries, making the natural spline preferable for applications prioritizing minimal endpoint oscillation.

General C² Interpolating Cubic Spline

A general C² interpolating cubic spline is constructed to pass through given data points (xi,yi)(x_i, y_i) for i=0,1,,ni = 0, 1, \dots, n, where x0<x1<<xnx_0 < x_1 < \dots < x_n, ensuring that the function and its first two derivatives are continuous across the knots xix_i. On each subinterval [xi,xi+1][x_i, x_{i+1}], the spline s(x)s(x) is a cubic si(x)s_i(x), leading to a total of 4n4n unknown coefficients for the nn pieces. The interpolation conditions s(xi)=yis(x_i) = y_i and s(xi+1)=yi+1s(x_{i+1}) = y_{i+1} provide 2n2n equations. Continuity of the first s(x)s'(x) at the n1n-1 interior knots yields n1n-1 additional equations, and continuity of the second s(x)s''(x) at those points gives another n1n-1 equations, resulting in 4n24n - 2 equations overall. Two boundary conditions are required to determine a unique solution, such as those for or clamped splines. To derive the explicit form, denote hi=xi+1xih_i = x_{i+1} - x_i and assume the second derivatives at the knots are mi=s(xi)m_i = s''(x_i). Integrating the second derivative twice on [xi,xi+1][x_i, x_{i+1}] and applying the conditions leads to the piecewise expression: s(x)=yi(xi+1x)3hi3+yi+1(xxi)3hi3+mi(xi+1x)3hi2(xi+1x)6hi+mi+1(xxi)3hi2(xxi)6hi,\begin{aligned} s(x) &= y_i \frac{(x_{i+1} - x)^3}{h_i^3} + y_{i+1} \frac{(x - x_i)^3}{h_i^3} \\ &\quad + m_i \frac{(x_{i+1} - x)^3 - h_i^2 (x_{i+1} - x)}{6 h_i} + m_{i+1} \frac{(x - x_i)^3 - h_i^2 (x - x_i)}{6 h_i}, \end{aligned} for x[xi,xi+1]x \in [x_i, x_{i+1}]. This form satisfies the local interpolation and incorporates the second derivatives mim_i. The values mim_i are determined by enforcing continuity of s(x)s'(x) at the interior knots, which produces a of n1n-1 equations. Define the first differences di=yi+1yihid_i = \frac{y_{i+1} - y_i}{h_i}. The resulting tridiagonal for i=1,,n1i = 1, \dots, n-1 is: hi1mi1+2(hi1+hi)mi+himi+1=6(didi1).h_{i-1} m_{i-1} + 2(h_{i-1} + h_i) m_i + h_i m_{i+1} = 6(d_i - d_{i-1}). This is strictly diagonally dominant and thus solvable uniquely for the interior mim_i once the boundary conditions specify m0m_0 and mnm_n. With appropriate boundary conditions, the entire spline is unique. For a sufficiently smooth underlying function fC4[x0,xn]f \in C^4[x_0, x_n] with maximum subinterval length h=maxhih = \max h_i, the interpolation error satisfies fs5384h4maxf(4)\|f - s\|_\infty \leq \frac{5}{384} h^4 \max |f^{(4)}|.

Advanced Representations

B-Splines

B-splines provide a stable and efficient basis for representing splines of arbitrary degree, offering advantages in numerical and local control over the spline or surface. Introduced independently by Cox and de Boor, these basis functions are defined with respect to a knot vector, which specifies the points where the spline's pieces join. The basis functions Ni,k(x)N_{i,k}(x) of degree kk (where k0k \geq 0) are defined recursively over a non-decreasing vector ξ={ξi}\xi = \{\xi_i\}. For the base case, the zeroth-degree B-spline is the : Ni,0(x)={1if ξix<ξi+1,0otherwise.N_{i,0}(x) = \begin{cases} 1 & \text{if } \xi_i \leq x < \xi_{i+1}, \\ 0 & \text{otherwise}. \end{cases} For higher degrees, the Cox-de Boor formula is: Ni,k(x)=xξiξi+kξiNi,k1(x)+ξi+k+1xξi+k+1ξi+1Ni+1,k1(x),N_{i,k}(x) = \frac{x - \xi_i}{\xi_{i+k} - \xi_i} N_{i,k-1}(x) + \frac{\xi_{i+k+1} - x}{\xi_{i+k+1} - \xi_{i+1}} N_{i+1,k-1}(x), with the conventions that yields zero and empty products are one. Key properties of B-splines include non-negativity (Ni,k(x)0N_{i,k}(x) \geq 0 for all xx and ii), the (iNi,k(x)=1\sum_i N_{i,k}(x) = 1 for xx in the span of the knots), and local support (each Ni,k(x)N_{i,k}(x) is nonzero only on the interval [ξi,ξi+k+1][\xi_i, \xi_{i+k+1}]). These traits ensure that changes to a single control point affect only a limited portion of the spline, enhancing computational stability compared to other bases like . The recursion also underpins in evaluation, avoiding ill-conditioned operations like . Any spline s(x)s(x) of degree kk over the knot vector ξ\xi can be uniquely represented as a of B-splines: s(x)=iciNi,k(x)s(x) = \sum_i c_i N_{i,k}(x), where the coefficients cic_i are called control points that intuitively guide the shape of the spline. The Cox-de Boor facilitates efficient evaluation through algorithms like the de Boor algorithm, which computes s(x)s(x) via a triangular of values derived from the control points and knots, achieving O(k2)O(k^2) complexity per evaluation point.

Other Bases and Names

One alternative representation for splines employs the truncated power basis, which expresses a spline of degree kk as s(x)=j=0kajxj+i=1mci(xξi)+ks(x) = \sum_{j=0}^k a_j x^j + \sum_{i=1}^m c_i (x - \xi_i)_+^k, where ()+(\cdot)_+ denotes the positive part function, defined as (z)+=max(z,0)(z)_+ = \max(z, 0), the coefficients aja_j and cic_i determine the and spline components, and ξi\xi_i are the knots. This basis facilitates theoretical analysis, such as proofs of existence and uniqueness in , due to its direct connection to the piecewise structure. However, it is numerically ill-conditioned for computation, as the basis functions become increasingly linearly dependent with higher degrees or more knots, leading to in coefficient estimation. Cardinal splines provide another basis, consisting of normalized B-splines centered at the knots such that they satisfy the cardinal property, where the spline evaluates to 1 at its center and 0 at all others. These are particularly useful in sampling for reconstructing signals from discrete samples on grids, as they form an orthonormal-like basis for shift-invariant spaces. For knot spacing, cardinal splines exhibit infinite support, extending beyond local intervals to ensure global consistency in periodic or bandlimited signal approximation, unlike finite-support B-splines. Splines also appear under specialized names reflecting their geometric or functional extensions. Demazure splines arise in , generalizing classical splines to functions on projective varieties, where they satisfy smoothness conditions adapted to the variety's structure rather than . Generalized splines extend the definition to allow discontinuities in derivatives or the function itself at knots, enabling representation of non-smooth data while maintaining piecewise form elsewhere. Periodic splines, designed for closed curves, impose on the knots and coefficients, ensuring the spline wraps seamlessly around a cycle without endpoint discontinuities. Conversions between spline bases, such as from the truncated power basis to the basis, rely on linear transformations via change-of-basis matrices that map coefficients while preserving the spline's values and . These matrices are typically lower triangular and banded for efficiency, with explicit constructions available for uniform knots, allowing improvements by shifting to the B-spline representation.

References

Add your contribution
Related Hubs
User Avatar
No comments yet.