Equivalance form for Slerp in quaternions interpolation

386 Views Asked by At

In all the books I have found that Slerp have two forms:

A

enter image description here

B

enter image description here

I know that all the forms from A are equivalent but I don't know why the forms from A are equivalent with the form from B.

Can you explain me why?

Thanks!

http://webcourse.cs.technion.ac.il/234325/Winter2014-2015/ho/WCFiles/10_Animations_bw.pdf pag 38

1

There are 1 best solutions below

0
On BEST ANSWER

Let's take the first version of (A), call it $$ Slerp_1(p,q,t) = p (p^* q)^t$$ while $$ Slerp_B(p,q,t) = \dfrac{p \sin((1-t)\omega) + q \sin(t\omega )}{\sin(\omega)}$$ where $\omega$ is the angle between $p$ and $q$ (and to have this make sense, we need $0 < \omega < \pi$).

Note that if $u$ is any unit quaternion, $(up)^* (uq) = p^* u^* u q = p^* q$, so $$Slerp_1(up,uq,t) = u\; Slerp_1(p,q,t)$$ But it's also clear that $$Slerp_B(up,uq,t) = u Slerp_B(p,q,t)$$ (with the same $\omega$, i.e. the angle between $up$ and $uq$ is the angle between $p$ and $q$).

In particular, taking $u = p^*$ we have $$Slerp_1(1,p^*q,t) = p^*\; Slerp_1(p,q,t)$$ and so to prove $Slerp_1(p,q,t) = Slerp_B(p,q,t)$ it's sufficient to consider the case $p=1$. In this case, we have $Slerp_1(1,q,t) = q^t$.

Now we can write $q = \cos(\omega) + \sin(\omega) v = e^{\omega v}$ (the polar form of $q$) where $\cos(\omega)$ is the scalar part of $q$, which is the angle between $1$ and $q$, and $v$ is a purely imaginary unit quaternion. Again we'll need to assume $0 < \omega < \pi$ (there is no unique definition of $(-1)^t$ as a quaternion). Then $$q^t = e^{\omega t v} = \cos(\omega t) + \sin(\omega t) v$$ On the other hand, $$Slerp_B(1,q,t) = \dfrac{\sin((1-t)\omega)+ (\cos(\omega)+\sin(\omega) v) \sin(t\omega )}{\sin(\omega)}$$ and expanding out the first sine makes this $\cos(\omega t) + \sin(\omega t) v$ as well.