Subject: matrix_to_angle problem

From: [email-masked] (Mullie (Jurriaan Mulder))
Date: Wed, 28 Apr 1993 15:29:04 +0200

Hi there,

I'm playing with Rend386 for a while now, and walked into a (small ?) problem.
It's about the function "matrix_to_angle."
This function seems to wrong values for the tilt angle, if this angle is close 
to 90 or -90 degrees.

I've looked at the code, but can't figure out what is excactly going on.
For instance, if I would make a rotation matrix, with pan = 0, tilt = 90, and
roll = 0 (no translation), the matrix would (in my opinion) look like this:

{ 1  0  0  0 }
{ 0  0 -1  0 }
{ 0  1  0  0 }
{ 0  0  0  1 }

If I go through the code, the matrix_to_angle function will come up with
pan = 90, tilt = 0, and roll = 0.

If the tilt angle is close to 90, for instance 87, the function seems to 
negate the tilt, so deliver -87.

Is this inherent to the used algorithm?
If so, is there any other algorithm that can solve the matrix to angle problem
correctly?
Or is this problem unsolvable?

Please help me out here, cause I would like to use this function.

TIA,

Mullie,

e-mail: [email-masked]