Read More
Date: 22-8-2021
1318
Date: 5-11-2021
1211
Date: 14-2-2016
1040
|
A cubic spline is a spline constructed of piecewise third-order polynomials which pass through a set of control points. The second derivative of each polynomial is commonly set to zero at the endpoints, since this provides a boundary condition that completes the system of equations. This produces a so-called "natural" cubic spline and leads to a simple tridiagonal system which can be solved easily to give the coefficients of the polynomials. However, this choice is not the only one possible, and other boundary conditions can be used instead.
Cubic splines are implemented in the Wolfram Language as BSplineCurve[pts, SplineDegree -> 3].
Consider 1-dimensional spline for a set of points . Following Bartels et al. (1998, pp. 10-13), let the th piece of the spline be represented by
(1) |
where is a parameter and , ..., . Then
(2) |
|||
(3) |
Taking the derivative of in each interval then gives
(4) |
|||
(5) |
Solving (2)-(5) for , , , and then gives
(6) |
|||
(7) |
|||
(8) |
|||
(9) |
Now require that the second derivatives also match at the points, so
(10) |
|||
(11) |
|||
(12) |
|||
(13) |
for interior points, as well as that the endpoints satisfy
(14) |
|||
(15) |
This gives a total of equations for the unknowns. To obtain two more conditions, require that the second derivatives at the endpoints be zero, so
(16) |
|||
(17) |
Rearranging all these equations (Bartels et al. 1998, pp. 12-13) leads to the following beautifully symmetric tridiagonal system
(18) |
If the curve is instead closed, the system becomes
(19) |
REFERENCES:
Bartels, R. H.; Beatty, J. C.; and Barsky, B. A. "Hermite and Cubic Spline Interpolation." Ch. 3 in An Introduction to Splines for Use in Computer Graphics and Geometric Modelling. San Francisco, CA: Morgan Kaufmann, pp. 9-17, 1998.
Burden, R. L.; Faires, J. D.; and Reynolds, A. C. Numerical Analysis, 6th ed. Boston, MA: Brooks/Cole, pp. 120-121, 1997.
Press, W. H.; Flannery, B. P.; Teukolsky, S. A.; and Vetterling, W. T. "Cubic Spline Interpolation." §3.3 in Numerical Recipes in FORTRAN: The Art of Scientific Computing, 2nd ed. Cambridge, England: Cambridge University Press, pp. 107-110, 1992.
|
|
علامات بسيطة في جسدك قد تنذر بمرض "قاتل"
|
|
|
|
|
أول صور ثلاثية الأبعاد للغدة الزعترية البشرية
|
|
|
|
|
مكتبة أمّ البنين النسويّة تصدر العدد 212 من مجلّة رياض الزهراء (عليها السلام)
|
|
|