Cubic Spline Derivative

Community Forums/General Help/Cubic Spline Derivative

beanage(Posted 2010) [#1]
Hey,

I just came across this problem, and cant really get my head around it. It just exceeds my high-school maths skills :{

What I essentially want to do, is calculating the distance of a point to a spline curve.

Naturally, to retrieve the spline interpolation value closest to the point, what I did was creating this equation, which I would solve for s:


Anybody a clue of how to retreive Spline' ?


Sauer(Posted 2010) [#2]
Well, Spline is a function, which you should know when defining the spline. Spline' will be the derivative of Spline at point s.


Floyd(Posted 2010) [#3]
There won't be any easy answer to this. It will come down to some kind of numerical approximation.

You could start your research here:

http://www.google.com/search?hl=en&source=hp&q=%22cubic+spline%22+closest+point


beanage(Posted 2010) [#4]
@Floyd: I must apologize for having been a little upset about your answer :) To my defence, up to this very point in time, there has never been a problem I couldnt find an analytical solution for.. yay, until now.

Took my a while to dig through the various approximation methods. A good resource was this PDF.

My final solution can be found in the Code Archives.