This article has multiple issues. Please help improve it or discuss these issues on the talk page . (Learn how and when to remove these template messages)
|
In the mathematical subfield of numerical analysis, a B-spline or basis spline is a spline function that has minimal support with respect to a given degree, smoothness, and domain partition. Any spline function of given degree can be expressed as a linear combination of B-splines of that degree. Cardinal B-splines have knots that are equidistant from each other. B-splines can be used for curve-fitting and numerical differentiation of experimental data.
In computer-aided design and computer graphics, spline functions are constructed as linear combinations of B-splines with a set of control points.
According to Gerald Farin, B-splines were explored as early as the nineteenth century by Nikolai Lobachevsky at Kazan University in Russia. [1] The term "B-spline" was coined by Isaac Jacob Schoenberg [2] in 1978 and is short for basis spline. [3] A spline function of order is a piecewise polynomial function of degree . The places where the pieces meet are known as knots. The key property of spline functions is that they and their derivatives may be continuous, depending on the multiplicities of the knots.
B-splines of order are basis functions for spline functions of the same order defined over the same knots, meaning that all possible spline functions can be built from a linear combination of B-splines, and there is only one unique combination for each spline function. [4]
A B-spline of order is a collection of piecewise polynomial functions of degree in a variable . The values of where the pieces of polynomial meet are known as knots, denoted and sorted into nondecreasing order.
For a given sequence of knots, there is, up to a scaling factor, a unique spline satisfying
If we add the additional constraint that
for all between the knots and , then the scaling factor of becomes fixed. The knots in-between (and not including) and are called the internal knots.
B-splines can be constructed by means of the Cox–de Boor recursion formula. We start with the B-splines of degree , i.e. piecewise constant polynomials.
The higher -degree B-splines are defined by recursion
A B-spline function is a combination of flexible bands that is controlled by a number of points that are called control points, creating smooth curves. These functions are used to create and manage complex shapes and surfaces using a number of points. B-spline function and Bézier functions are applied extensively in shape optimization methods. [5]
A B-spline of order is a piecewise polynomial function of degree in a variable . It is defined over locations , called knots or breakpoints, which must be in non-descending order . The B-spline contributes only in the range between the first and last of these knots and is zero elsewhere. If each knot is separated by the same distance (where ) from its predecessor, the knot vector and the corresponding B-splines are called "uniform" (see cardinal B-spline below).
For each finite knot interval where it is non-zero, a B-spline is a polynomial of degree . A B-spline is a continuous function at the knots. [note 1] When all knots belonging to the B-spline are distinct, its derivatives are also continuous up to the derivative of degree . If the knots are coincident at a given value of , the continuity of derivative order is reduced by 1 for each additional coincident knot. B-splines may share a subset of their knots, but two B-splines defined over exactly the same knots are identical. In other words, a B-spline is uniquely defined by its knots.
One distinguishes internal knots and end points. Internal knots cover the -domain one is interested in. Since a single B-spline already extends over knots, it follows that the internal knots need to be extended with endpoints on each side, to give full support to the first and last B-spline, which affect the internal knot intervals. The values of the endpoints do not matter, usually the first or last internal knot is just repeated.
The usefulness of B-splines lies in the fact that any spline function of order on a given set of knots can be expressed as a linear combination of B-splines:
B-splines play the role of basis functions for the spline function space, hence the name. This property follows from the fact that all pieces have the same continuity properties, within their individual range of support, at the knots. [6]
Expressions for the polynomial pieces can be derived by means of the Cox–de Boor recursion formula [7]
That is, is piecewise constant one or zero indicating which knot span x is in (zero if knot span j is repeated). The recursion equation is in two parts:
ramps from zero to one as x goes from to , and
ramps from one to zero as x goes from to . The corresponding Bs are zero outside those respective ranges. For example, is a triangular function that is zero below , ramps to one at and back to zero at and beyond . However, because B-spline basis functions have local support, B-splines are typically computed by algorithms that do not need to evaluate basis functions where they are zero, such as de Boor's algorithm.
This relation leads directly to the FORTRAN-coded algorithm BSPLV, which generates values of the B-splines of order n at x. [8] The following scheme illustrates how each piece of order n is a linear combination of the pieces of B-splines of order n − 1 to its left.
Application of the recursion formula with the knots at gives the pieces of the uniform B-spline of order 3
These pieces are shown in the diagram. The continuity property of a quadratic spline function and its first derivative at the internal knots are illustrated, as follows
The second derivative of a B-spline of degree 2 is discontinuous at the knots:
Faster variants of the de Boor algorithm have been proposed, but they suffer from comparatively lower stability. [9] [10]
A cardinal B-spline has a constant separation h between knots. The cardinal B-splines for a given order n are just shifted copies of each other. They can be obtained from the simpler definition. [11]
The "placeholder" notation is used to indicate that the n-th divided difference of the function of the two variables t and x is to be taken by fixing x and considering as a function of t alone.
A cardinal B-spline has uniformly spaced knots, therefore interpolation between the knots equals convolution with a smoothing kernel.
Example, if we want to interpolate three values in between B-spline nodes (), we can write the signal as
Convolution of the signal with a rectangle function gives first order interpolated B-spline values. Second-order B-spline interpolation is convolution with a rectangle function twice ; by iterative filtering with a rectangle function, higher-order interpolation is obtained.
Fast B-spline interpolation on a uniform sample domain can be done by iterative mean-filtering. Alternatively, a rectangle function equals sinc in Fourier domain. Therefore, cubic spline interpolation equals multiplying the signal in Fourier domain with sinc4.
See Irwin–Hall distribution#Special cases for algebraic expressions for the cardinal B-splines of degree 1–4.
The term P-spline stands for "penalized B-spline". It refers to using the B-spline representation where the coefficients are determined partly by the data to be fitted, and partly by an additional penalty function that aims to impose smoothness to avoid overfitting. [12]
Two- and multidimensional P-spline approximations of data can use the face-splitting product of matrices to the minimization of calculation operations. [13]
The derivative of a B-spline of degree k is simply a function of B-splines of degree k − 1: [14]
This implies that
which shows that there is a simple relationship between the derivative of a spline function and the B-splines of degree one less.
Univariate B-splines, i.e. B-splines where the knot positions lie in a single dimension, can be used to represent 1-d probability density functions . An example is a weighted sum of B-spline basis functions of order , which each are area-normalized to unity (i.e. not directly evaluated using the standard de-Boor algorithm)
and with normalization constant constraint . The k-th raw moment of a normalized B-spline can be written as Carlson's Dirichlet average , [15] which in turn can be solved exactly via a contour integral and an iterative sum [16] as
with
and . Here, represents a vector with the knot positions and a vector with the respective knot multiplicities. One can therefore calculate any moment of a probability density function represented by a sum of B-spline basis functions exactly, without resorting to numerical techniques.
A Bézier curve is also a polynomial curve definable using a recursion from lower-degree curves of the same class and encoded in terms of control points, but a key difference is that all terms in the recursion for a Bézier curve segment have the same domain of definition (usually ), whereas the supports of the two terms in the B-spline recursion are different (the outermost subintervals are not common). This means that a Bézier curve of degree given by control points consists of about mostly independent segments, whereas the B-spline with the same parameters smoothly transitions from subinterval to subinterval. To get something comparable from a Bézier curve, one would need to impose a smoothness condition on transitions between segments, resulting in some manner of Bézier spline (for which many control points would be determined by the smoothness requirement).
A piecewise/composite Bézier curve is a series of Bézier curves joined with at least C0 continuity (the last point of one curve coincides with the starting point of the next curve). Depending on the application, additional smoothness requirements (such as C1 or C2 continuity) may be added. [17] C1 continuous curves have identical tangents at the breakpoint (where the two curves meet). C2 continuous curves have identical curvature at the breakpoint. [18]
Usually in curve fitting, a set of data points is fitted with a curve defined by some mathematical function. For example, common types of curve fitting use a polynomial or a set of exponential functions. When there is no theoretical basis for choosing a fitting function, the curve may be fitted with a spline function composed of a sum of B-splines, using the method of least squares. [19] [note 2] Thus, the objective function for least-squares minimization is, for a spline function of degree k,
where W(x) is a weight, and y(x) is the datum value at x. The coefficients are the parameters to be determined. The knot values may be fixed or treated as parameters.
The main difficulty in applying this process is in determining the number of knots to use and where they should be placed. de Boor suggests various strategies to address this problem. For instance, the spacing between knots is decreased in proportion to the curvature (2nd derivative) of the data.[ citation needed ] A few applications have been published. For instance, the use of B-splines for fitting single Lorentzian and Gaussian curves has been investigated. Optimal spline functions of degrees 3–7 inclusive, based on symmetric arrangements of 5, 6, and 7 knots, have been computed and the method was applied for smoothing and differentiation of spectroscopic curves. [20] In a comparable study, the two-dimensional version of the Savitzky–Golay filtering and the spline method produced better results than moving average or Chebyshev filtering. [21]
In computer-aided design and computer graphics applications, a spline curve is sometimes represented as , a parametric curve of some real parameter . In this case the curve can be treated as two or three separate coordinate functions , or . The coordinate functions , and are each spline functions, with a common set of knot values .
Because a B-splines form basis functions, each of the coordinate functions can be expressed as a linear sum of B-splines, so we have
The weights , and can be combined to form points in 3-d space. These points are commonly known as control points.
Working in reverse, a sequence of control points, knot values, and order of the B-spline define a parametric curve. This representation of a curve by control points has several useful properties:
A less desirable feature is that the parametric curve does not interpolate the control points. Usually the curve does not pass through the control points.
A cubic B-spline curve with a normalized parameter is defined by four nodes (i.e. control points ) , , , and . It forms a polynomial of degree 3 that can be written as
This corresponds to B-spline polynomials
and the curve can be evaluated as . Expanding this, we can write the full polynomial form as below
Since this is a cubic polynomial, we can also write it as a cubic Bézier curve with control points , , , and , such that
A piecewise cubic B-spline is formed by a set of nodes and each four consecutive nodes define a cubic piece of the curve with the formulation above.
In computer aided design, computer aided manufacturing, and computer graphics, a powerful extension of B-splines is non-uniform rational B-splines (NURBS). NURBS are essentially B-splines in homogeneous coordinates. Like B-splines, they are defined by their order, and a knot vector, and a set of control points, but unlike simple B-splines, the control points each have a weight. When the weight is equal to 1, a NURBS is simply a B-spline and as such NURBS generalizes both B-splines and Bézier curves and surfaces, the primary difference being the weighting of the control points which makes NURBS curves "rational".
By evaluating a NURBS at various values of the parameters, the curve can be traced through space; likewise, by evaluating a NURBS surface at various values of the two parameters, the surface can be represented in Cartesian space.
Like B-splines, NURBS control points determine the shape of the curve. Each point of the curve is computed by taking a weighted sum of a number of control points. The weight of each point varies according to the governing parameter. For a curve of degree d, the influence of any control point is only nonzero in d+1 intervals (knot spans) of the parameter space. Within those intervals, the weight changes according to a polynomial function (basis functions) of degree d. At the boundaries of the intervals, the basis functions go smoothly to zero, the smoothness being determined by the degree of the polynomial.
The knot vector is a sequence of parameter values that determines where and how the control points affect the NURBS curve. The number of knots is always equal to the number of control points plus curve degree plus one. Each time the parameter value enters a new knot span, a new control point becomes active, while an old control point is discarded.
A NURBS curve takes the following form: [22]
Here the notation is as follows. u is the independent variable (instead of x), k is the number of control points, N is a B-spline (used instead of B), n is the polynomial degree, P is a control point and w is a weight. The denominator is a normalizing factor that evaluates to one if all weights are one.
It is customary to write this as
in which the functions
are known as the rational basis functions.
A NURBS surface is obtained as the tensor product of two NURBS curves, thus using two independent parameters u and v (with indices i and j respectively): [23]
with
as rational basis functions.
A Bézier curve is a parametric curve used in computer graphics and related fields. A set of discrete "control points" defines a smooth, continuous curve by means of a formula. Usually the curve is intended to approximate a real-world shape that otherwise has no mathematical representation or whose representation is unknown or too complicated. The Bézier curve is named after French engineer Pierre Bézier (1910–1999), who used it in the 1960s for designing curves for the bodywork of Renault cars. Other uses include the design of computer fonts and animation. Bézier curves can be combined to form a Bézier spline, or generalized to higher dimensions to form Bézier surfaces. The Bézier triangle is a special case of the latter.
A centripetal force is a force that makes a body follow a curved path. The direction of the centripetal force is always orthogonal to the motion of the body and towards the fixed point of the instantaneous center of curvature of the path. Isaac Newton described it as "a force by which bodies are drawn or impelled, or in any way tend, towards a point as to a centre". In Newtonian mechanics, gravity provides the centripetal force causing astronomical orbits.
In mathematics, Legendre polynomials, named after Adrien-Marie Legendre (1782), are a system of complete and orthogonal polynomials with a vast number of mathematical properties and numerous applications. They can be defined in many ways, and the various definitions highlight different aspects as well as suggest generalizations and connections to different mathematical structures and physical and numerical applications.
In the mathematical field of differential geometry, a metric tensor is an additional structure on a manifold M that allows defining distances and angles, just as the inner product on a Euclidean space allows defining distances and angles there. More precisely, a metric tensor at a point p of M is a bilinear form defined on the tangent space at p, and a metric field on M consists of a metric tensor at each point p of M that varies smoothly with p.
In geometric modelling and in computer graphics, a composite Bézier curve or Bézier spline is a spline made out of Bézier curves that is at least continuous. In other words, a composite Bézier curve is a series of Bézier curves joined end to end where the last point of one curve coincides with the starting point of the next curve. Depending on the application, additional smoothness requirements may be added.
In linear algebra, the characteristic polynomial of a square matrix is a polynomial which is invariant under matrix similarity and has the eigenvalues as roots. It has the determinant and the trace of the matrix among its coefficients. The characteristic polynomial of an endomorphism of a finite-dimensional vector space is the characteristic polynomial of the matrix of that endomorphism over any base. The characteristic equation, also known as the determinantal equation, is the equation obtained by equating the characteristic polynomial to zero.
Bézier surfaces are a species of mathematical spline used in computer graphics, computer-aided design, and finite element modeling. As with Bézier curves, a Bézier surface is defined by a set of control points. Similar to interpolation in many respects, a key difference is that the surface does not, in general, pass through the central control points; rather, it is "stretched" toward them as though each were an attractive force. They are visually intuitive and, for many applications, mathematically convenient.
Non-uniform rational basis spline (NURBS) is a mathematical model using basis splines (B-splines) that is commonly used in computer graphics for representing curves and surfaces. It offers great flexibility and precision for handling both analytic and modeled shapes. It is a type of curve modeling, as opposed to polygonal modeling or digital sculpting. NURBS curves are commonly used in computer-aided design (CAD), manufacturing (CAM), and engineering (CAE). They are part of numerous industry-wide standards, such as IGES, STEP, ACIS, and PHIGS. Tools for creating and editing NURBS surfaces are found in various 3D graphics, rendering, and animation software packages.
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 mathematical subfield of numerical analysis, de Boor's algorithm is a polynomial-time and numerically stable algorithm for evaluating spline curves in B-spline form. It is a generalization of de Casteljau's algorithm for Bézier curves. The algorithm was devised by German-American mathematician Carl R. de Boor. Simplified, potentially faster variants of the de Boor algorithm have been created but they suffer from comparatively lower stability.
In control engineering and system identification, a state-space representation is a mathematical model of a physical system specified as a set of input, output, and variables related by first-order differential equations or difference equations. Such variables, called state variables, evolve over time in a way that depends on the values they have at any given instant and on the externally imposed values of input variables. Output variables’ values depend on the state variable values and may also depend on the input variable values.
In multivariable calculus, the implicit function theorem is a tool that allows relations to be converted to functions of several real variables. It does so by representing the relation as the graph of a function. There may not be a single function whose graph can represent the entire relation, but there may be such a function on a restriction of the domain of the relation. The implicit function theorem gives a sufficient condition to ensure that there is such a function.
In quantum field theory, the Lehmann–Symanzik–Zimmermann (LSZ) reduction formula is a method to calculate S-matrix elements from the time-ordered correlation functions of a quantum field theory. It is a step of the path that starts from the Lagrangian of some quantum field theory and leads to prediction of measurable quantities. It is named after the three German physicists Harry Lehmann, Kurt Symanzik and Wolfhart Zimmermann.
In applied mathematics, polyharmonic splines are used for function approximation and data interpolation. They are very useful for interpolating and fitting scattered data in many dimensions. Special cases include thin plate splines and natural cubic splines in one dimension.
In kinematics, the motion of a rigid body is defined as a continuous set of displacements. One-parameter motions can be defined as a continuous displacement of moving object with respect to a fixed frame in Euclidean three-space (E3), where the displacement depends on one parameter, mostly identified as time.
Smoothing splines are function estimates, , obtained from a set of noisy observations of the target , in order to balance a measure of goodness of fit of to with a derivative based measure of the smoothness of . They provide a means for smoothing noisy data. The most familiar example is the cubic smoothing spline, but there are many other possibilities, including for the case where is a vector quantity.
Isogeometric analysis is a computational approach that offers the possibility of integrating finite element analysis (FEA) into conventional NURBS-based CAD design tools. Currently, it is necessary to convert data between CAD and FEA packages to analyse new designs during development, a difficult task since the two computational geometric approaches are different. Isogeometric analysis employs complex NURBS geometry in the FEA application directly. This allows models to be designed, tested and adjusted in one go, using a common data set.
Stokes' theorem, also known as the Kelvin–Stokes theorem after Lord Kelvin and George Stokes, the fundamental theorem for curls or simply the curl theorem, is a theorem in vector calculus on . Given a vector field, the theorem relates the integral of the curl of the vector field over some surface, to the line integral of the vector field around the boundary of the surface. The classical theorem of Stokes can be stated in one sentence: The line integral of a vector field over a loop is equal to the surface integral of its curl over the enclosed surface. It is illustrated in the figure, where the direction of positive circulation of the bounding contour ∂Σ, and the direction n of positive flux through the surface Σ, are related by a right-hand-rule. For the right hand the fingers circulate along ∂Σ and the thumb is directed along n.
In computer graphics, the centripetal Catmull–Rom spline is a variant form of the Catmull–Rom spline, originally formulated by Edwin Catmull and Raphael Rom, which can be evaluated using a recursive algorithm proposed by Barry and Goldman. It is a type of interpolating spline defined by four control points , with the curve drawn only from to .
Kernel methods are a well-established tool to analyze the relationship between input data and the corresponding output of a function. Kernels encapsulate the properties of functions in a computationally efficient way and allow algorithms to easily swap functions of varying complexity.
Works cited