hi laeuchli,
(1) "matrix to a quaternion .. but I wonder if doing so will introduce further singularities?"
as long as the matrix is orthogonal (meaning each axis is perpendicular to each other axis)
and the length of each axis is 1, also referenced as a unit vector, and the result quaternion
is normalized after calculation, then the result will be perfect, so you dont have to worry about
singularities here.
but the problem you are facing with euler-angles occurs earlier, when you apply a new rotation
to the current one of your object.
(2) "adding multiplies of 360 degrees, and selecting the resultant solution .."
the problem is that an infinite set of euler-angles can represent the same rotation/orientation
A { 0, 90, 0 } == B { 360, 90, 0 }
the orientation of both objects is the same.
hence, if you want to smoothly move from one orientation to another and you try to interpolate
the steps in between, you will have different steps (or velocity, angular velocity).
lets have a look at this example:
lets move from { 0, 90, 0 } to { 30, 90, 0 } in 3 steps. we would add 10 in each step
to the first component, the other components remain the same so we add 0 for both, so
we add { 10, 0, 0 }
origin: { 0, 90, 0 }
step 1: { 10, 90, 0 }
step 2: { 20, 90, 0 }
step 3: { 30, 90, 0 }
but since { 10, 0, 0 } == { 370, 0, 0 } we get problems, if we use the second version.
this happens, if you try to use euler-angles for angular velocities, i.e. if you want
to simulate physical behaviour with your objects using euler-angles.
if you use quaternions for angular velocities, there is a somewhat similar problem,
but this is much easier to handle and to detect (with conjugation) but anyway ..
so my summarize is:
if you start learning about 3d graphics, euler-angles are a good start to understand
rotations and orientation, since we can easily imagine them. but if you try to get deeper into this
matter, meaning you need better accuracy, i.e. for writing a physics-engine, euler-angles
will hardly give you the results you want and a lot of headache trying to eliminate the
drawbacks of them. then you should start thinking about switching to so called axis-angles
or quaternions.
i'd recommend starting with axis-angles first, since they are not so hard to understand as quaternions.
so i hope that didn't confuse you too much and it helped you a little. if you have more questions
feel free to ask ..
ike :)
Main Topics
Browse All Topics





by: ozoPosted on 2007-07-18 at 23:11:36ID: 19519649
http://www.euclideanspace. com/maths/ geometry/r otations/ c onversions /matrixToQ uaternion/ index.htm com/maths/ geometry/r otations/ c onversions /quaternio nToEuler/i ndex.htm
http://www.euclideanspace.