(p0, p1, t)
return np.sin((1.0-t)*omega) / so * p0 + np.sin(t*omega)/so * p1
Spherical linear interpolation.
Spherical linear interpolation.
Spherical linear interpolation .
def _slerp(p0, p1, t):
  """Spherical linear interpolation."""
  omega = np.arccos(
      np.dot(np.squeeze(p0/np.linalg.norm(p0)),
             np.squeeze(p1/np.linalg.norm(p1))))
  so = np.sin(omega)
  return np.sin((1.0-t)*omega) / so * p0 + np.sin(t*omega)/so * p1
def _slerp ( p0 , p1 , t ) : omega = np . arccos ( np . dot ( np . squeeze ( p0 / np . linalg . norm ( p0 ) ) , np . squeeze ( p1 / np . linalg . norm ( p1 ) ) ) ) so = np . sin ( omega ) return np . sin ( ( 1.0 - t ) * omega ) / so * p0 + np . sin ( t * omega ) / so * p1