Spherical Linear interpolation (
SLERP)
- - Consider two rotations with corresponding quaternion \(q_1\), \(q_2\).
- - The spherical linear interpolated quaternion at parameter \(t\in[0,1]\) is
-
- \(\displaystyle q(t) = \frac{\sin ((1-t)\Omega)}{\sin(\Omega)} q_1 + \frac{\sin (t\Omega)}{\sin(\Omega)} q_2 \;\;\;\) with \(\cos(\Omega)=q_1
\cdot q_2\)
Demonstration
- Consider
-
- - Two unit vectors (arbitrary dimensions) \(v_1\), \(v_2\).
- - \(\Omega\): angle b/w \(v_1\) and \(v_2\)
- - The interpolated vector \(v\) at angle \(\theta=\Omega t\), \(t\in[0,1]\).
- \(v=v_1\cos(\theta)+v_1^{\perp}\sin(\theta)\), and \(v_1^{\perp}=\frac{v_2-\cos(\Omega)\,v_1}{\sin(\Omega)}\)
- \(\Rightarrow v = \left(\frac{\sin(\Omega)\,\cos(\theta)-\cos(\Omega)\,\sin(\theta)}{\sin(\Omega)}\right)v_1+\frac{\sin(\theta)}{\sin(\Omega)}v_2
\)
- \(\Rightarrow v = \frac{\sin(\Omega-\theta)}{\sin(\Omega)} v_1 + \frac{\sin(\theta)}{\sin(\Omega)}\)