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?


  • $\begingroup$ Why the downvote? $\endgroup$ – bubba Jul 5 '14 at 6:28
  • $\begingroup$ Is this a real-valued spline function, or a 2D curve (i.e. a spline function with values in $\mathbb{R}^2$ ? $\endgroup$ – bubba Jul 5 '14 at 6:29
  • $\begingroup$ It is a 2D curve. A point on the output spline should be defined by (x(t), y(t)). $\endgroup$ – user3806513 Jul 6 '14 at 2:23
  • $\begingroup$ Then constraining the second derivative might not be what you want. The problem is that the second derivative depends on the parameterization of the curve, not just on its shape. Constraining curvature might be more appropriate. However, this is pretty nasty non-linear problem. The only approach I can suggest is the brute force one -- toss the problem to your favorite constrained optimization package. Given a decent starting point, there is some chance of success. $\endgroup$ – bubba Jul 7 '14 at 11:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.