gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > Linear interpolation on an up vector

#164948 - DiscoStew - Wed Dec 03, 2008 10:18 pm

This is probably a silly question with what I am trying to do.

For my project involving Catmull-Rom curves (many of you remember me asking things about curves before, but I am quite content with the switch to Catmull-Rom curves for this project), I am taking the tangent of the position curve as a starting point in getting the resulting orientation of the object on the curve moving forward. I am also supplying an up vector at the start of the entire curve data for correctness on these curves, as it will be used with the tangent to get the normal and binormal to create a rotation matrix. However, I only have it for the start, and I feel that I need to supply it for each control point on the curves, as I want more control of the object's rotation from one point to the next.

As I am only dealing with the up vector, would there be any real problems by linearly interpolating from one up vector to the next and re-normalizing it, or should I use a different method?
_________________
DS - It's all about DiscoStew

#164979 - sajiimori - Fri Dec 05, 2008 1:36 am

Spherical Linear Interpolation (SLERP) will give a smoother result, but linear+normalize is worth a try -- it might be close enough.