• FEATURED
• FEATURED
• FEATURED
• FEATURED
• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# Does a Quaternion has a Handness?

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

4 replies to this topic

### #1刘增钢（LIU ZENG GANG)  Members

Posted 29 January 2014 - 06:15 PM

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, 29 January 2014 - 07:13 PM.

### #2Álvaro  Members

Posted 29 January 2014 - 06:52 PM

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, 29 January 2014 - 06:52 PM.

### #3Promit  Senior Moderators

Posted 29 January 2014 - 07:53 PM

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.

SlimDX | Shark Eaters for iOS | Ventspace Blog | Twitter | Proud supporter of diversity and inclusiveness in game development

### #4刘增钢（LIU ZENG GANG)  Members

Posted 13 February 2014 - 04:01 PM

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

### #5cdoubleplusgood  Members

Posted 14 February 2014 - 04:43 AM

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.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.