A spline is a smooth curve defined mathematically by two or more points called knots. The term comes fom the spline gadget used by shipbuilders to draw smooth shapes.
Within numerical analysis they are for piecewise polynomial interpolation. The important characteristic of splines is thus that they are given by polynomials, but only piecewise: different polynomials may be used in different parts of a curve.
The simplicity of representation and the ease with which a complex spline's shape may be computed make splines popular representations for curves in computer science, predominantly in computer graphics but also for other kinds of interpolation, such as smoothing of digital audio.
There are different forms of splines:
- Linear spline - the knots are connected with straight lines, requiring the end point of a previous segment to meet the starting point of the following segment resulting in piecewise linear interpolation.
- Quadratic spline - the knots are connected with parabolas, with points meeting and first order derivatives of the curves are continuous at the knots.
- Cubic spline - the knots are connected using cubic functions, and both first- and second order derivatives are continuous at the knot points.
- Higher-order spline
- Nonuniform rational B-spline (NURBS)
The cubic splines are the most common type.
There exists an efficient scheme for evaluating a spline curve, known as the de Boor algorithm.