Lecture NotesDr. Tong Lai Yu, 2010
Curves and Surfaces
Hermite Interpolation
- Consider both derivatives at data points as well as data points
themselves; closely related to "Newton divided difference" method.
- May consider Cubic polynomials; curve passing through 5 points
P_{0}, P_{1},P_{2},P_{3},P_{4},
( a set of data points can be broken down to groups of 5 points )
- P_{k} = ( x_{k}, y_{k}, z_{k} ),
we can consider each component separately
- Subinterval (x_{k}, x_{k+1}) can be normalized to ( 0, 1 ) via
t = ( x - x_{k} ) / ( x_{k+1} - x_{k} )
- The k-th cubic segment of the interpolated curve is given by
x_{k} (t) = a_{k} t^{3} + b_{k} t^{2} +
c_{k} t + d_{k} 0 ≤ t ≤ 1
so that x_{k}(0) = x_{k}, x_{k}(1) = x_{k+1}
- So,
at t = 0: d_{k} = x_{k}
at t = 1: a_{k} + b_{k} +c_{k} +d_{k} = x_{k+1}
k = 0, 1, 2, 3
- The derivatives are
x'_{k}(t) = d x_{k}(t) / dt =
3a_{k} t^{2} + 2b_{k} t^{1} +
c_{k}
- Let x'_{k} = x'_{k}(0), x'_{k+1} = x'_{k}(1)
at t = 0: c_{k} = x'_{k}
at t = 1: 3a_{k} + 2b_{k} + c_{k} = x'_{k+1}
- From f) and h), we can solve the coefficients:
d_{k} = x_{k}
c_{k} = x'_{k}
b_{k} = 3(x_{k+1}- x_{k}) - 2x'_{k} - x'_{k+1}
a_{k} = x'_{k+1} + x'_{k} - 2(x_{k+1} - x_{k})
How to find the derivatives ( slopes ) ?
Consider second derivatives:
x"_{k}(t) = d^{2}x_{k}(t)/dt^{2}
= 6a_{k}t + 2b_{k}
---- (1)
We require the second derivatives to be continuous, i.e. x"_{k-1}(1) = x"_{k}(0), So
3a_{k-1} + b_{k-1} = b_{k} for k = 1, 2, 3, 4
---- (2)
Substituting a_{k}, and b_{k} of i) into (2), we have
3[x'_{k} + x'_{k-1} - 2(x_{k} - x_{k-1})] +
3(x_{k}- x_{k-1}) - 2x'_{k-1} - x'_{k} =
3(x_{k+1}- x_{k}) - 2x'_{k} - x'_{k+1}
which can be simplified to
x'_{k-1} + 4 x'_{k} + x'_{k+1} =
3 ( x_{k+1} - x_{k-1} ) for k = 1, 2, 3, 4
---- (3)
This gives us 4 sets of equations:
x'_{0} + 4x'_{1} + x'_{2} |
= |
3(x_{2} - x_{0}) |
--- (4a) |
x'_{1} + 4x'_{2} + x'_{3} |
= |
3(x_{3} - x_{1}) |
--- (4b) |
x'_{2} + 4x'_{3} + x'_{4} |
= |
3(x_{4} - x_{2}) |
--- (4c) |
Now we have 3 equations but 5 unknowns. We need 2 more; so we choose,
x"_{0}(0) = 0
x"_{4}(1) = 0
which gives ( from 1 ),
b_{0} = 0
3a_{4} + b_{4} = 0
Substituting these into i), we have
2x'_{0} + x'_{1} |
= |
3(x_{1} - x_{0}) |
--- (4d) |
2x'_{4} + x'_{3} |
= |
3(x_{4} - x_{3}) |
--- (4e) |
So we have 5 equations, 4a-4e, and can solve for the 5
unknowns x'_{i}, i = 0, 1, 2, 3, 4