[Numpy-discussion] Quaternion dtype for NumPy - initial implementation available
Martin Ling
martin-numpy at earth.li
Fri Jul 29 13:07:34 EDT 2011
On Fri, Jul 29, 2011 at 09:14:00AM -0600, Charles R Harris wrote:
>
> Well, if the shuttle used a different definition then it was out there
> somewhere. The history of quaternions is rather involved and mixed up with
> vectors, so it may be the case that there were different conventions.
My point is that these are conventions of co-ordinate frame, not of
different representations of quaternions themselves. There's no two
"handednesses" of quaternions to support. There are an infinte number of
co-ordinate frames, and a quaternion can be interpreted as a rotation in
any one of them. It's a matter of interpretation, not calculation.
> It might also be that the difference was between vector and
> coordinate rotations, but it is hard to tell without knowing how
> the code actually made use of the results.
Indeed, this is the other place the duality shows up. If q is the
rotation of frame A relative to frame B, then a vector v in A appears
in B as:
v' = q * v * q.conjugate
while a vector u in B appears in A as:
u' = q.conjugate * u * q
The former is often thought of as 'rotating the vector' versus the
second as 'rotating the co-ordinate frame', but both are actually the
same operation performed using a different choice of frames.
Martin
More information about the NumPy-Discussion
mailing list