Jump to content
  • Advertisement
Sign in to follow this  

Does a Quaternion has a Handness?

This topic is 2069 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

I am just investigating and confused the implicit handness of an Unit Quaternion(Quat), which will be used to represent a Rotation around an Axis U and rotation angle A.


But in which direction should we rotate around Axis U? 


From the definition:

Quat : cos(A/2) + U*sin(A/2)


We know that angle must be CCW, because positive angle is got from a CCW rotation.


And if we use this Quat to rotate a Point P we can use 

Q * P * Q^  with Q^ is the conjugate of Quat Q


I think all above is nothing to do with the Handness of Coordinate System.



Right now if we are  in Left Handed System(LHS).

we use CW angle as positive angle and want to create a Quat using this CW angle A. 

And after using Q * P * Q^, we will get the CW rotated point P'. 



But how about that in Right Handed System(RHS)? 

if P is defined in RHS at the beginning

and A is CCW angle(Positive Angle),

we almost can get the same Quat(as in LHS, just y,z components swapped). 

but if we rotate P in RHS using Quat Q, it will transform P to the same P' as in LHS

or mirrored position P'' ? 


I hope i have made my purpose clearly.

I just want to using quaternion all the time(NO conversion to matrix).

I want to create the rotation(represented using quaternion) from an Axis and an Angle.

I am just confused here, why Q * P * Q^ can always transform P into the correct spatial position as expected, even if we have treated CW angle as positive in LHS and CCW angle in RHS.


Please help. and correct my errors in the above explanation.

thank you a lot




Somebody has told me, Quaternion does have any kind of handness, just the conversion from Quat to Matrix does. 

But how can quaternion handle the rotation using its product?

Edited by Promit

Share this post

Link to post
Share on other sites
It is bad form to ask a question and then edit it away. It makes the thread useless. If you found the answer, you can leave the original post where it was and make another one explaining that you found the answer, and what it is. That way others might benefit from your experience. Edited by Álvaro

Share this post

Link to post
Share on other sites

I restored the original thread content. The answer to the original question is that no, quaternions do not have a handedness. Quaternions are a representation. A coordinate system does have handedness, and a quaternion is typically used to represent a rotation in a particular coordinate system. In order to use a quaternion to compute or represent a rotation, you need to agree on handedness of a coordinate system. The quat itself doesn't inherently imply any particular axes.

Share this post

Link to post
Share on other sites

Sorry, I really would like to remove this thread.

But I have not found that way.


So. My own answer to my owe question is:


- Each Quaternion is Handedless. The same quaternion will be used independent in which kind of coordinate system


- The ONLY thing which does matter here is:

 i) Multiply Operation in Quaternion uses Cross Product( which really does its real job by rotation a vector, if we are just composing the quat, it is also handedless), which is based on the Handedness. If you use Left Handed System, and Clockwise Rotation angle as positive angle, then after multiply(better after rotating the vector), the end vector will be rotated CW.


ii) the Transform from Quaternion to Matrix also has a handedness. There are two diff ways to create that rotation matrix:

 For LHS

  [ 1 - 2yy - 2zz    2xy - 2wz      2xz + 2wy    ]
  [ 2xy + 2wz      1 - 2xx - 2zz    2yz - 2wx    ]
  [ 2xz - 2wy      2yz + 2wx      1 - 2xx - 2yy  ]
  If we want to Convert a Quaternion into Matrix in RHS
  [ 1 - 2yy - 2zz    2xy + 2wz      2xz - 2wy    ]
  [ 2xy - 2wz      1 - 2xx - 2zz    2yz + 2wx    ]

  [ 2xz + 2wy      2yz - 2wx      1 - 2xx - 2yy  ] 


So in summary:

a) quaternion has NO Handedness

b) just the rotation transform for our vector has added that Handedness

Share this post

Link to post
Share on other sites

This is a very uncommon definition.

Actually, vectors, matrixes, quaternions, and their operations (including cross product) don't have handedness. This is because math is about numbers, not hands or clocks.

Handedness enters the scene only if you project the vectors into real world: Your hands, your clock, or what's up, right, back and front on your screen (this is why projection matrixes have "handedness", actually, what is said to be a "right handed projection matrix" in DirectX performs a mirroring operation).

The difference in your conversion comes because you define angles differently for RHS and LHS. Rule of thumb (literally ;-) ): When you rotate the x-axis (forefinger) around the z-axis (thumb) towards the y-axis (middle finger), this a a positive rotation angle. This works for the right and for the left hand.

Share this post

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!