Skip to main content

slerp_rates

Function slerp_rates 

Source
pub fn slerp_rates(a: V3, b: V3, s: f64) -> [V3; 3]
Expand description

The rotation vector of slerp(a, b, s) and its first and second derivative by s, in closed form. The slerp turns at the constant angular velocity w = log(q_b q_a*) in space, so the rotation vector r has r’ = J^-1 w with the inverse left Jacobian J^-1 = I - [r]/2 + c [r]^2 (c = 1/theta^2 - cot(theta/2) / (2 theta), theta = |r|), and r’’ follows by differentiating that along r’. Valid past the slerp’s ends too, short of theta = 2 pi.