• Advertisement
Sign in to follow this  

Improper rotations (reflections) with quaternions

This topic is 2458 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Rotation matrices can perform reflections, also known as improper rotations, roto-reflections etc. One way to find out whether a rotation matrix represents an improper rotation is to check whether its determinant is negative. Can a quaternion represent such transforms? How to make a reflection quaternion?

Thanks.

Share this post


Link to post
Share on other sites
Advertisement
No, you can't do it with quaternions. I would use matrices if I needed to represent general isometries.

Share this post


Link to post
Share on other sites
Not if you use the standard qxq^{-1} formula to apply your quaternion to a vector. The reason for this is that multiplication by a quaternion is a linear map too, and so it does have a determinant, but if this determinant is negative, then so is the determinant of q^{-1}, and then you're applying two linear maps that both have a negative determinant, which of course results in a net positive determinant. Of course if you just stick a negative sign before it (-qxq^{-1}) you end up with all orientation reversing isometries, which are indeed the reflections and rotoreflections. Note that the reflections are exactly those quaternions that have 0 real part, in which case the imaginary part describes the vector you are reflecting over.

Share this post


Link to post
Share on other sites

Not if you use the standard qxq^{-1} formula to apply your quaternion to a vector. The reason for this is that multiplication by a quaternion is a linear map too, and so it does have a determinant, but if this determinant is negative, then so is the determinant of q^{-1}, and then you're applying two linear maps that both have a negative determinant, which of course results in a net positive determinant. Of course if you just stick a negative sign before it (-qxq^{-1}) you end up with all orientation reversing isometries, which are indeed the reflections and rotoreflections. Note that the reflections are exactly those quaternions that have 0 real part, in which case the imaginary part describes the vector you are reflecting over.



Actually, I'm pretty wrong here.

- Quaternions are 4D numbers, and a representation of a 3D vector as a pure quaternion, multiplied by another quaternion will often result in a quaternion with a non zero real part, which means that quaternion multiplication can only be viewed as a 4D linear map, and thus the sign of the determinant of this map doesn't say anything about the sign of the determinant of a restriction of this map to 3D (similar to how a 2D reflection can be represented by a 180 degrees 3D rotation. The determinant of this 2D reflection has a determinant of -1, while the corresponding 3D rotation, which, besides reflecting the 2D part, also sends the z axis to minus z, still has determinant 1).

- Left multiplication by a quaternion gives a linear map that can be different from the one induced by right multiplication, so I couldn't just assume that their determinants had the same sign.

My conclusion was still right though, the improper rotations can be done using x' = -qxq^{-1}:

It's know that any 4D rotation can be represented as a pair of two unit quaternions (p,q), with which you can transform a 4D vector (represented as a full quaternion) as follows:

x' = pxq

Since the 3D rotation x' = qxq^{-1} is of this form too, the quaternions q and q^{-1} must also represent a 4D rotation, which just happens to send the 3D subspace to itself. This means that the remaining axis, which corresponds to the real numbers, must also be mapped to itself. A 4D quaternion rotation has determinant 1, so if it's restriction to 3D has a determinant of 1 as well, then the real numbers must be mapped to themselves, while if the restriction to 3D has a determinant of -1, then, to still get a determinant of 1 for the 4D rotation, the real numbers must be mapped to their negatives.

So, since the real numbers commute with all quaternions, a pair of quaternions represents a 3D rotation if

for any real number r:

r = prq
r = rpq
1 = pq

and thus q = p^{-1}, which matches the usual form.

Then, for a rotoreflection,
r = -prq
r = -rpq
-1 = pq

and thus p = -q^{-1}, so x = -qxq^{-1}

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement