Spherical Linear interpolation (
SLERP)
- - Consider two units vectors (arbitrary dimensions) \(v_1\), \(v_2\).
- - The spherical linear interpolation at parameter \(t\in[0,1]\) is
-
- \(\displaystyle v(t) = \frac{\sin ((1-t)\Omega)}{\sin(\Omega)} v_1 + \frac{\sin (t\Omega)}{\sin(\Omega)} v_2 \;\;\;\) with \(\cos(\Omega)=v_1
\cdot v_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)} v_2\)