Public Group

# 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.

## 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 on other sites
- 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 on other sites
Nice explanation. So you're saying that SLERP smoothly rotates the object but doesn't change the position??

##### Share on other sites
Quote:
 Original post by spaceJockey123Nice 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.

##### 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 on other sites
Quote:
 Original post by spaceJockey123ok 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.

1. 1
Rutin
24
2. 2
3. 3
JoeJ
18
4. 4
5. 5

• 38
• 23
• 13
• 13
• 17
• ### Forum Statistics

• Total Topics
631706
• Total Posts
3001833
×