How can I generate a spline with a maximum second derivative without specifying first derivative for mid points?

709 Views Asked by At

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:

  1. second derivative must remain below a certain value, so that corners are not too tight
  2. second derivative must be zero at the end (approaching endpoint in straight line)
  3. first derivative of endpoints can be set
  4. 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!