Hi,
I have some question about quaternions:
1) How to convert a right handed quaternion to a left handed quaternion ?
2) How to convert a left handed quaternion to a right handed quaternion ?
3) I have readed "the quaternion power". Are the conversion between quaternions and matrices the same for right handed quaternions and left handed quaternions ?
4) Where can i find documentations about differences between left handed quaternions and right handed quaternions ?

**0**

# Quaternions (Left handed / Right-handed)

Started by texel3d, Aug 13 2007 09:14 PM

4 replies to this topic

Sponsor:

###
#3
Crossbones+ - Reputation: **2349**

Posted 14 August 2007 - 05:35 AM

I'm no expert, but this is the way i do it, and it seems to be fairly happy... (and in my head, with my understanding of quats, it seems to make some sense)

Negate the axis. (i.e. if the rotation was going right before, negating the axis makes it rotate to the left).

Negate the axis.

Not actually sure, i think so. I do everything in RH, therefore if i'm using an API that's LH i use their matrix funcs rather than my own....

No idea, never found anything that was human readable by a programmer - it's normally all math i don't understand anymore ;)

Quote:

Original post by texel3d

1) How to convert a right handed quaternion to a left handed quaternion ?

Negate the axis. (i.e. if the rotation was going right before, negating the axis makes it rotate to the left).

Quote:

Original post by texel3d

2) How to convert a left handed quaternion to a right handed quaternion ?

Negate the axis.

Quote:

Original post by texel3d

3) I have readed "the quaternion power". Are the conversion between quaternions and matrices the same for right handed quaternions and left handed quaternions ?

Not actually sure, i think so. I do everything in RH, therefore if i'm using an API that's LH i use their matrix funcs rather than my own....

Quote:

Original post by texel3d4) Where can i find documentations about differences between left handed quaternions and right handed quaternions ?

No idea, never found anything that was human readable by a programmer - it's normally all math i don't understand anymore ;)

###
#4
Members - Reputation: **2022**

Posted 14 August 2007 - 06:03 AM

Quote:Strictly speaking, there's no difference (at least not AFAIK) between a 'left-handed' and a 'right-handed' quaternion. Really, there's not even such a thing as a 'left-handed' or 'right-handed' quaternion. (The same holds for converting a quaternion to a matrix - setting aside issues of notational convention, there's only one way to do it.)

Original post by texel3d

Hi,

I have some question about quaternions:

1) How to convert a right handed quaternion to a left handed quaternion ?

2) How to convert a left handed quaternion to a right handed quaternion ?

3) I have readed "the quaternion power". Are the conversion between quaternions and matrices the same for right handed quaternions and left handed quaternions ?

4) Where can i find documentations about differences between left handed quaternions and right handed quaternions ?

Coordinate system handedness only comes into play when it comes to time to visualize your simulation. Up to that point, however, it's just numbers, and in this context a quaternion is a quaternion, and a matrix is a matrix. So the first thing to do is probably to let go of the idea of quaternion 'handedness' (because, unless I'm mistaken, there is no such thing).

However, that isn't to say that you won't need to perform the occasional 'conversion' (As RobTheBloke describes above). But this isn't because the quaternion is of the wrong 'handedness'; it's simply because you want the

*visualization*of your simulation to have certain characteristics (for example, the chain-gun arm of your mutant cyborg character is supposed to be on the left, not the right). In this context, you may have to change some things so that the model looks right, and so that the rotations in your animation sequence rotate the 'right' way.

As far as this goes, I don't think there's any one correct way to change the 'handedness' of a rotation in quaternion form. Negating the axis might work in some contexts, but in other contexts you may have to negate the angle (the w component), and also reflect the axis across a central plane. It just depends.

Oh, and there's also the issue of what axis is considered to be 'up', which has nothing to do with handedness per se, but can also cause no end of confusion when importing models or animations.

Finally, a disclaimer: although I'm fairly confident in the accuracy of the above information, I've never actually had occasion to perform these sorts of 'conversions' with respect to quaternions, so I'm not speaking from direct experience here. However, I feel confident in saying that quaternion and matrix rotations do not in and of themselves have a (spatial) handedness - this is simply a convention we impose upon them when it comes time to visualize our simulation.