Skip to content

EulerAngles

Adrian Quintana edited this page Dec 11, 2017 · 1 revision

Interpretation of the Euler angles in Xmipp

Any two coordinate systems (O (object) with axis xyz and U (universe) with axis XYZ) with common origin and equal orientation and angles between axes, are related by 3 rotations defined as follows. Consider the intersection of the xy and the XY coordinate planes (line of nodes, LN) and define the following angles:

  • a is the angle between the y-axis and the line of nodes.
  • b is the angle between the z-axis and the Z-axis.
  • g is the angle between the line of nodes and the Y-axis.

Description of the rotations implied by the Euler angles:

Euler Angles Definition

A rotation of angle a around the z axis, followed by a rotation of angle b around the new y axis (line of nodes, LN) and finally a rotation around the new z axis of angle g brings the axis xyz to XYZ. By developing each of the rotations, we have that the associated matrix is given by M= RaRbRg.


         cos a   -sin a   0 
    Ra=  sin a    cos a   0
           0        0     1
   
        cos b      0     sin b 
    Rb=   0        1       0
       -sin b      0     cos b

         cos g   -sin g   0 
    Rg=  sin g    cos g   0
           0        0     1


The columns of M are the axis U expressed in terms of the axis O and, thus, provide the coordinate change from U to O. By coordinate change we mean that a point with coordinates (X,Y,Z) in the system of coordinates U has coordinates (x,y,z)^t=M(X,Y,Z)^t in O. Therefore in order to get the coordinate change from O to U, we must take the inverse M^-1= R-gR-bR-a, which is given by:


    ca = cos(alpha); cb = cos(beta); cg = cos(gamma);
    sa = sin(alpha); sb = sin(beta); sg = sin(gamma);
    cc = cb*ca; cs = cb*sa;
    sc = sb*ca; ss = sb*sa;

    A(0,0) =  cg*cc-sg*sa; A(0,1) =  cg*cs+sg*ca; A(0,2) = -cg*sb;
    A(1,0) = -sg*cc-cg*sa; A(1,1) = -sg*cs+cg*ca; A(1,2) = sg*sb;
    A(2,0) =  sc;          A(2,1) =  ss;          A(2,2) = cb;


The above matrix is returned by calling  xmippEuler_angles2matrix(a,b,g)

-- Main.CoSS - 03 Aug 2009

Clone this wiki locally