Julio Jerez wrote:let us say that
a02 = -sin (y)
is is cleat that we can get y form
y = asin(-a02)
by here is the problem
since sin (y) = sin (180 - y)
I had a bit more of a think about this. I rewrote the general form of the rotation as follows (excuse the formatting):
{ {Cos[y] Cos[z], -Cos[y] Sin[z], Sin[y]},
{Cos[z] Sin[x] Sin[y] + Cos[x] Sin[z], Cos[x] Cos[z] - Sin[x] Sin[y] Sin[z], -Cos[y] Sin[x]},
{-Cos[x] Cos[z] Sin[y] + Sin[x] Sin[z], Cos[z] Sin[x] + Cos[x] Sin[y] Sin[z], Cos[x] Cos[y]} }
Which is the same as yours except for the odd plus or minus (I was basing it on elementry rotation matrices).
Then, I made a series of substitutions from a arbitary example { {a,b,c}, {d,e,f}, {g,h,i} } into the matrix to give:
{{a, b, c},
{-a c f Sec[y]^2 - b i Sec[y]^2, -b c f Sec[y]^2 + a i Sec[y]^2, f},
{b f Sec[y]^2 - a c i Sec[y]^2, -a f Sec[y]^2 - b c i Sec[y]^2, i} }
Leaving terms involving cos(y). I had thought you could then use atan2(sin(y),cos(y)) but know thinking about it, the squaring of sec(y) means that we can't reconstruct? The thing is, you can reconstruct from a single rotation matrix about y because you have the individual cos(y) and sin(y) terms:
{ {Cos[y], 0, Sin[y]}, {0, 1, 0}, {-Sin[y], 0, Cos[y]} }
So is it only under multiplication of the three matrices that the sign gets lost?
Thanks, Joe