From: Matthias Baas <matthias.baas@gm...>  20080825 15:20:43

Hi, just to let you know, I have replaced the toEuler*() methods with a more robust and (hopefully) correct version. Instead of my rather naive approach from before, I'm now using the algorithm from the comp.graphics.algorithms FAQ: http://www.cgafaq.info/wiki/Euler_angles_from_matrix I have also updated the unit tests to include cases like below, so let's hope that I got it right this time. In the example from below, the result is now 60 (which is equivalent to 300) instead of 60. The code is in svn, so if you are in a position to compile the package yourself, I would appreciate if you could give it a try. Cheers,  Matthias  Myrek wrote: > I wanted to use the toEulerXYZ () and probably wrong acts. > First rotate "podstawa1" axis of 300 degrees so as: > > podstawa1.rot = mat3.fromEulerXYZ (0, 0, radians (300)) > > and it's ok: > > >>> Podstawa1.rot > (0.5, 0.866025, 0) > (0.866025, 0.5, 0) > (0, 0, 1) > > But I wants back to read about how many degrees is rotate: > > >>> ile = degrees (podstawa1.rot.toEulerXYZ () [2]) > >>> Print ile > 60.0 > > Provides 60 instead of 300, why? You can see that the function > toEulerXYZ () calculates 180  (300180) = 60, why? How to correctly > read the angle of rotation over 180 degrees? The toEulerXYZ () reads > correctly only up to 180 degrees. > > Thx. > Myrek 