I've done interpolation before with bezier splines and cubic splines, but I need to find a way to limit the second derivative throughout the curve so that there is a limit to how sharp the corner can be.
The requirements for the program are:
- second derivative must remain below a certain value, so that corners are not too tight
- second derivative must be zero at the end (approaching endpoint in straight line)
- first derivative of endpoints can be set
- first derivative of middle points must be automatically chosen
I know that if cubic splines are used, I can guarantee that the endpoints have second derivative equal to zero, but I have no clue how to limit the second derivative. Perhaps by using a higher order spline interpolation? How can this be accomplished?
My current thought for requirement 4 is to simply find the slope between the point before and the point after, then use that. Is there a better way?
Thanks!