# Quaternion explanation

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

## Recommended Posts

Okay, I just got the book "Real Time Rendering" and it looks pretty good. :D I'm reading up about Quaternions, oh, and by the way, is it pronounced like "quake" or "quarter" ?? Anyway, I'm reading up about quaternions and it gives a definition: quaternion = (qv,qw) = iqx + jqy + kqz + qw = qv + qw, qv = iqx + jqy + kqz So, here I am slightly confused, I know that qv is the vector part, but what is qw? Is it just a number? And it has a definition of the Conjugate: quaternion* = (qv,qw)* = (-qv,qw) What exactly is the conjugate?

##### Share on other sites
Quote:
 Original post by EndarOkay, I just got the book "Real Time Rendering" and it looks pretty good. :DI'm reading up about Quaternions, oh, and by the way, is it pronounced like "quake" or "quarter" ??Anyway, I'm reading up about quaternions and it gives a definition:quaternion = (qv,qw) = iqx + jqy + kqz + qw = qv + qw,qv = iqx + jqy + kqzSo, here I am slightly confused, I know that qv is the vector part, but what is qw? Is it just a number?And it has a definition of the Conjugate:quaternion* = (qv,qw)* = (-qv,qw)What exactly is the conjugate?

yes. w is just number, it is so-called real part of quaternion, just like real part of complex number.
I think it should be better written as w,x,y,z to be more consistant with mathematical notation...
Conjugate is conjugate, defined as you wrote, or in words, quaternion with same real part and negated vector part. Just like complex number conjugate.
Some Properties:
Conjugate of unit length quaternion is equal to inverse of quaternion, and gives inverse transform.
With rotations, q and -q store exactly same rotations. So, some useful trick:
-q* = (qv, -qw)
stores same rotation as q* , but is bit faster to compute, and simpler to use in derivations.

##### Share on other sites
Quote:
 What exactly is the conjugate?

went on a rant over at openGL.org this morning.... This might help explain why it's useful....

##### Share on other sites
Nice description there Rob.
One thing I'm wondering about Quats: I know you can slerp them over time, but what is the process when you just want to e.g. rotate a Quat one degree in the X axis..?

##### Share on other sites
You can rotate quaternion itself, but it's probably not what you want and probably will not correspond to something visually meaningful.

If you want to rotate coordinate frame storen in quaternion, it is done by multiplication.
That is,
quaternion turn=AxisAndAngleToQuaternion(1,0,0,pi/180);// by one defree around x axis

if you want turn in coordinate frame storen in quat, (that is, if quaternion contains car orientation and you want to turn around car's x axis) use
quat=quat*turn;
and if you want to turn around world's x axis, use
quat=turn*quat;

Idea is simple, if you post-multiply(first case), your vectors will be transformed as if them is first transformed by turn, then by quat. If you pre-multiply(second case) , like if them is first transformed by quat, then by turn.

To understand post and pre multiply better, try to imagine/do consecutive turns in real world with some object, e.g. box with +x,+y,+z,-y,-y,-z painted on it, initially placed so all coordinate axises is the same as world's axises. (so first turn is always around object's axises(that is the same as world's axises at this point), and second turn is around world's axises that will be not the same as object's axises after first turn)

[Edited by - Dmytry on January 6, 2005 2:36:12 PM]

##### Share on other sites
Yes, object space is what I meant.
Thanks Dmytry - nice explanation :)

1. 1
Rutin
29
2. 2
3. 3
4. 4
5. 5

• 13
• 13
• 11
• 10
• 14
• ### Forum Statistics

• Total Topics
632961
• Total Posts
3009491
• ### Who's Online (See full list)

There are no registered users currently online

×