Jump to content
  • Advertisement
Sign in to follow this  
spaceJockey123

Linear interpolation with quaternions

This topic is 4071 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 understand the purpose of Quaternions but I really don't get what linear interpolation (and SLERP) is and how they all go together. Could someone enlighten me?

Share this post


Link to post
Share on other sites
Advertisement
- You've got something in a place A.
- You want it to be in a place B.
- You don't want it to teleport but to take about one second to reach B.
- Where is it after half a second? (in the line between A and B and at half the distance from both).

That's linear interpolation.

The same but instead of a translation a rotation.
- You've got something looking at A
- You want it to look at B.
- You don't want it to teleport but to take about one second to rotate towards B.
- Where is it looking to after half a second? (in the circular arc between A and B and at half the arc length from both)

That's slerp.

Share this post


Link to post
Share on other sites
Quote:
Original post by spaceJockey123
Nice explanation. So you're saying that SLERP smoothly rotates the object but doesn't change the position??

No a slerp interpolates one point to another so that its distance from a given reference point changes linearly. In particular, if you slerp from a point, P, to another, Q, both of which are the same distance from your origin, O, then the result will travel from P to Q along the arc of a circle, so that it maintains the same distance from O.

Slerping is simply linear interpolation in some appropriate polar coordinate basis.

Admiral

Share this post


Link to post
Share on other sites
ok so you're trying to say that it's the same as linear interpolation except it travels in the arc of a circle instead of a line? And the arc of the circle has fixed distance from an origin.

I did check Wikipedia like I always do but I didn't understand and needed a more basic answer.

Share this post


Link to post
Share on other sites
Quote:
Original post by spaceJockey123
ok so you're trying to say that it's the same as linear interpolation except it travels in the arc of a circle instead of a line? And the arc of the circle has fixed distance from an origin.

No, I was trying to say exactly what I said [rolleyes].
The 'uniform distance'/'arc of a circle' situation is a special case where the start- and end-points are the same distance from the reference.

Admiral

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!