Sign in to follow this  
spaceJockey123

Linear interpolation with quaternions

Recommended Posts

- 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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this