(p0, p1, t)
return np.sin((1.0 - t) * omega) / so * p0 + np.sin(t * omega) / so * p1
Spherical interpolation.
Spherical interpolation.
Spherical interpolation .
def slerp(p0, p1, t):
  """Spherical interpolation."""
  omega = np.arccos(np.dot(p0 / np.linalg.norm(p0), 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 ( p0 / np . linalg . norm ( p0 ) , p1 / np . linalg . norm ( p1 ) ) ) so = np . sin ( omega ) return np . sin ( ( 1.0 - t ) * omega ) / so * p0 + np . sin ( t * omega ) / so * p1