Hello,

Given a quaternion holding the orientation of the model, how can I calculate which quadrant the quaternion is in? The quadrants are defined as:

1st Quadrant ( x, y)

2nd Quadrant (-x, y)

3rd Quadrant (-x,-y)

4th Quadrant ( x,-y)

Hello,

Given a quaternion holding the orientation of the model, how can I calculate which quadrant the quaternion is in? The quadrants are defined as:

1st Quadrant ( x, y)

2nd Quadrant (-x, y)

3rd Quadrant (-x,-y)

4th Quadrant ( x,-y)

Assuming that you only rotate around the Z-axis:

angle=acos(quat[w])*2

will give you the angle in radians.

Originally posted by rh:

Assuming that you only rotate around the Z-axis:

angle=acos(quat[w])*2

will give you the angle in radians.

No it’s an arbitrary orientation used to simulate a trackball.

Do you want to know where the point (1,0,0) is rotated by the quaternion? In that case can you transform the quaternion to a matrix and check the first two values.

http://sjbaker.org/steve/omniv/matrices_can_be_your_friends.html

Originally posted by rh:

Do you want to know where the point (1,0,0) is rotated by the quaternion? In that case can you transform the quaternion to a matrix and check the first two values.

http://sjbaker.org/steve/omniv/matrices_can_be_your_friends.html

I know I don’t entirely understand quaternions, but can’t you think of a quaternion representing the rotation of the model as a vector extending out some distance from the model origin(0,0,0) and pointing directly at the eye? Now because the model has been rotated the quaternion exists in one of the quadrants of the model coordinate system.

Does that make sense? Or am I just showing my lack of understand?

A quaternion only represents a orientation. You can convert it to an angle and axis to rotate around. I guess its that axis you are refering to but your example is not general true. The axis can be the X-axis, Y-axis or any arbitary vector passing through origo.

A quaternion itself is just some numbers representing a rotation and does not rotate with the model. If you exchange “quaternion” with “rotation matrix” or “angle-axis” will you see how wrong it sounds.

Its not really anything mystic about quaternions. The same information could be represented by a rotation matrix or an angle-axis pair.