ROTATION3DTOEULERANGLES Extract Euler angles from a rotation matrix.

   [PHI, THETA, PSI] = rotation3dToEulerAngles(MAT)
   Computes Euler angles PHI, THETA and PSI (in degrees) from a 3D 4-by-4
   or 3-by-3 rotation matrix.

   ANGLES = rotation3dToEulerAngles(MAT)
   Concatenates results in a single 1-by-3 row vector. This format is used
   for representing some 3D shapes like ellipsoids.

   ... = rotation3dToEulerAngles(MAT, CONVENTION)
   CONVENTION specifies the axis rotation sequence. Default is 'ZYX'.
   Supported conventions are: 
       'ZYX','ZXY','YXZ','YZX','XYZ','XZY'
       'ZYZ','ZXZ','YZY','YXY','XZX','XYX'

   Example
   rotation3dToEulerAngles

   References
   Code from '1994 - Shoemake - Graphics Gems IV: Euler Angle Conversion:
   http://webdocs.cs.ualberta.ca/~graphics/books/GraphicsGems/gemsiv/euler_angle/EulerAngles.c
   (see also rotm2eul, that is part of MATLAB's Robotics System Toolbox)
   Modified using explanations in:
   http://www.gregslabaugh.net/publications/euler.pdf
   https://www.geometrictools.com/Documentation/EulerAngles.pdf

   See also
   transforms3d, rotation3dAxisAndAngle, createRotation3dLineAngle,
   eulerAnglesToRotation3d


 ------
 Authors: David Legland, oqilipo
 e-mail: david.legland@grignon.inra.fr
 Created: 2010-08-11,    using Matlab 7.9.0.529 (R2009b)
 Copyright 2010 INRA - Cepia Software Platform.

Package: matgeom