Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Spline interpolation
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Introduction== [[Image:Cubic spline.svg|thumb|right|Interpolation with cubic splines between eight points. Hand-drawn technical drawings for shipbuilding are a historical example of spline interpolation; drawings were constructed using flexible rulers that were bent to follow pre-defined points.]] Originally, ''[[Flat spline|spline]]'' was a term for [[wikt:elastic|elastic]] [[ruler]]s that were bent to pass through a number of predefined points, or ''knots''. These were used to make [[technical drawing]]s for [[shipbuilding]] and construction by hand, as illustrated in the figure. We wish to model similar kinds of curves using a set of mathematical equations. Assume we have a sequence of <math>n + 1</math> knots, <math>(x_0, y_0)</math> through <math>(x_n, y_n)</math>. There will be a cubic polynomial <math>q_i(x)=y</math> between each successive pair of knots <math>(x_{i-1}, y_{i-1})</math> and <math>(x_i, y_i)</math> connecting to both of them, where <math>i = 1, 2, \dots, n</math>. So there will be <math>n</math> polynomials, with the first polynomial starting at <math>(x_0, y_0)</math>, and the last polynomial ending at <math>(x_n, y_n)</math>. The [[curvature]] of any curve <math>y = y(x)</math> is defined as :<math>\kappa = \frac{y''}{(1 + y'^2)^{3/2}},</math> where <math>y'</math> and <math>y''</math> are the first and second derivatives of <math>y(x)</math> with respect to <math>x</math>. To make the spline take a shape that minimizes the bending (under the constraint of passing through all knots), we will define both <math>y'</math> and <math>y''</math> to be continuous everywhere, including at the knots. Each successive polynomial must have equal values (which are equal to the y-value of the corresponding datapoint), derivatives, and second derivatives at their joining knots, which is to say that :<math>\begin{cases} q_i(x_i) = q_{i+1}(x_i) = y_i \\ q'_i(x_i) = q'_{i+1}(x_i) \\ q''_i(x_i) = q''_{i+1}(x_i) \end{cases} \qquad 1 \le i \le n - 1.</math> This can only be achieved if polynomials of degree 3 (cubic polynomials) or higher are used. The classical approach is to use polynomials of exactly degree 3 β [[cubic spline]]s. In addition to the three conditions above, a ''natural cubic spline'' has the condition that <math>q''_1(x_0) = q''_n(x_n) = 0</math>. In addition to the three main conditions above, a ''clamped cubic spline'' has the conditions that <math>q'_1(x_0) = f'(x_0)</math> and <math>q'_n(x_n) = f'(x_n)</math> where <math>f'(x)</math> is the derivative of the interpolated function. In addition to the three main conditions above, a ''not-a-knot spline'' has the conditions that <math>q'''_1(x_1) = q'''_2(x_1)</math> and <math>q'''_{n-1}(x_{n-1}) = q'''_{n}(x_{n-1})</math>.<ref>{{Cite book |last=Burden |first=Richard |title=Numerical Analysis |last2=Faires |first2=Douglas |publisher=Cengage Learning |year=2015 |isbn=9781305253667 |edition=10th |pages=142β157}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)