Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


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?

share|cite|improve this question

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?

By using Fréchet means (look it up in Wikipedia I wrote most of that wiki page).

There are some problems --- While the arithmetic mean on a vector space is unique, Fréchet means on manifolds might not be unique (and they will not be for rotation matrices or quaternions!) But in the non-unique cases, if the total variance of the data is not too large, there will still be some unicity. To look on an extreme case of non-unicity, take the circle, with two data points, the north and the south pole. Then, following Winnie Pooh, there are two minimizers, namely the east and the west pole!

But in the case the data space is a Hadamard manifold, meaning it has everywhere non-positive curvature, the Frechet mean will be unique. The circle of course has positive curvature.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.