120202: ESM4A - Numerical Methods 363 Visualization and Computer Graphics Lab Jacobs University Cubic spline interpolation • In the following, we want to derive the collocation matrix for cubic spline interpolation. • Let us assume that we have equidistant knots. • To fulfill the Schoenberg-Whitney condition that N i n (u i ) ≠ 0 , for n=3 we set u i =i+2 for all i. • The spline shall be given in B-spline representation, i.e., with n=3.
19
Embed
Cubic spline interpolation€¦ · 120202: ESM4A - Numerical Methods 363 Visualization and Computer Graphics Lab Jacobs University Cubic spline interpolation • In the following,
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
120202: ESM4A - Numerical Methods 363
Visualization and Computer Graphics LabJacobs University
Cubic spline interpolation
• In the following, we want to derive the collocationmatrix for cubic spline interpolation.
• Let us assume that we have equidistant knots.• To fulfill the Schoenberg-Whitney condition that
Nin(ui) ≠ 0 , for n=3 we set ui=i+2 for all i.
• The spline shall be given in B-spline representation, i.e.,
with n=3.
120202: ESM4A - Numerical Methods 364
Visualization and Computer Graphics LabJacobs University
Cubic spline interpolation
• Cubic B-splines:
• For the collocation matrix, we need to evaluate the B-splines at the knots.
• Obviously, Ni3(uj) ≠ 0 only for j=i-1, j=i, and j=i+1.
• And, Ni3(ui-1) = Ni
3(ui+1).
120202: ESM4A - Numerical Methods 365
Visualization and Computer Graphics LabJacobs University
Cubic spline interpolation
• We use the de Boor algorithm to obtainNi
3(ui-1) = 1/6,Ni
3(ui) = 4/6, andNi
3(ui+1) = 1/6.(Exercise)
120202: ESM4A - Numerical Methods 366
Visualization and Computer Graphics LabJacobs University
Cubic spline interpolation• Putting it all together, we obtain the collocation matrix
• The matrix is sparse.• More precisely, it is a tridiagonal matrix.• The linear equation system can be solved efficiently
(see Section 2.3).• This is why we picked basis splines with minimal support.
120202: ESM4A - Numerical Methods 367
Visualization and Computer Graphics LabJacobs University
Affine invariance
• Looking at the first and the last row of thecollocation matrix, we observe that they do not sumup to one.
• Hence, the solution is not affinely invariant.• Affine invariance, however, is often desired,
especially in geometric modeling.• How can we fix it?
120202: ESM4A - Numerical Methods 368
Visualization and Computer Graphics LabJacobs University
Modified cubic spline interpolation
• One idea is to adjust the knot sequence, i.e., make itnon-equidistant at the endpoints.
• Suggestion: instead of knot sequence (2,3,4,5,…,m-1,m,m+1,m+2)use knot sequence (3,3½,4,5,…,m-1,m,m+½,m+1).
• Hence, for the collocation matrix, we need to evaluate the B-splines at values 3½ and m+½.
120202: ESM4A - Numerical Methods 369
Visualization and Computer Graphics LabJacobs University
Modified cubic spline interpolation• We have: N0
3(3½) = N33(3½) = 1/48,
N13(3½) = N2
3(3½) = 23/48.• The collocation matrix becomes
• Now all rows sum up to one (partition of unity of B-splines over [3,m-3]).
• The Schoenberg-Whitney condition is still satisfied.
120202: ESM4A - Numerical Methods 370
Visualization and Computer Graphics LabJacobs University