# how to extrapolate quaternions?

var rot = q2 * Quaternion.Inverse(q1); // rot is the rotation from t1 to t2
var dt = (t3 - t1)/(t2 - t1); // dt = extrapolation factor
var ang: float;
var axis: Vector3;
rot.ToAngleAxis(ang, axis); // find axis-angle representation
if (ang > 180) ang -= 360; // assume the shortest path
ang = ang * dt % 360; // multiply angle by the factor
q3 = Quaternion.AngleAxis(ang, axis) * q1; // combine with first rotation


is this the right way to extrapolate quaternions to q3 from q2 using q1?

-

There is no right way to extrapolate (or interpolate!) quaternions. It seems you are interested in rotations. Start to look into the simpler question of how to define "means" of rotations. There is a lot of work on this ( and similar) problems lately, you will find some good papers by searching for "means of rotation matrices" (type that into google, without the quotes. Then the first paper showing, by Moakher, is quite interesting) What is the relationship between interpolation and means? If you want to linearly interpolate a function $f(x)$ between $x_1$ and $x_2$, then the linear interpolator is simply a weghted mean $$w_1 x_1 + w_2 x_2$$ where the weight are differnt for each interpolation point. How can we define means outside of vector spaces, say in metric spaces or Riemannian manifolds?