• Advertisement
Sign in to follow this  

Constant speed animation along cubic Hermite spline?

This topic is 1518 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I couldn't find clear information about arc-length parameterization of cubic Hermite splines. How would I do this? I need to be able to do position=CalcPos(t) where the distance traced out by position is proportionate to delta-t. What's the best way to do this?

Share this post


Link to post
Share on other sites
Advertisement

One quick and hacky way to do it is to advance along the curve using very tiny increments of the curve parameter, s, accumulating distance as you go until you reach the distance you want to move. It's not as elegant as a numerical solution, but it's easy to do and should probably be fast enough for most applications. 

Share this post


Link to post
Share on other sites

You could do what FLeBlanc suggested. Calculate position for some value t and than find the distance between current position and last position. Check to see if distance is greater or smaller than the distance you wanted to pass. If it is then move along that distance by the amount you want.

Share this post


Link to post
Share on other sites

Yeah, as far as I know, there's not a simple arc-length formula you can plug a parameter into. You'd have to do some numerical integration at some point. I guess FLeBlanc's method is a type of numerical integration as well, but it's way more suited to a gaming application.

Share this post


Link to post
Share on other sites

Thanks. Looks like I might stick to the 1D case with a spline per degree of freedom that animation tools can export, where arc length isn't an issue.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement