I am reading an article about about cubic Hermite interpolation. In the cardinal spline curve section they give a formula to calculate tangents at end points given by:
Ti = a * ( Pi+1 - Pi-1 )
However, if I have two points P1 and P2 then to find T1
T1 = a*(P2-P0).
I need to calculate this but what should be my P0 point be? Similarly to find T2 I will need to know P3. Can anyone clarify this?
You're right, this formula only makes sense for inner points in your spline which have neighbours on both sides. For endpoints you have to get the tangent from other constraints. The common solutions are:
These ideas are brought up in the context of cubic splines, which require to solve a system of linear equations in order to get the polynomial coefficients for any part of the spline, because they minimize the total curvature of the whole spline, but in your case of Hermite splines they should be applicable, too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With