Reputation: 811
I've used the code avaiable at this link to implement the Cubic Spline Interpolation:
http://www.codeproject.com/Articles/560163/Csharp-Cubic-Spline-Interpolation
For each point in the spline I need to find the spline normal at that point. Does anyone known how to get the normal at the spline at a given point P(x_0,y_0)? Thank you
Upvotes: 0
Views: 1887
Reputation:
For a parametric equation, X=f(t), Y=g(t)
, the direction of the tangent vector is given by (f'(t), g'(t))
, and that of the normal vector is orthogonal (-g'(t), f'(t))
. The article shows you how to compute the slope, i.e. the derivative.
Upvotes: 2