The following is the representation for rotating about a unit quaternion {q0,q1,q2,q3} by an angle alpha:
q_0=cos(alpha/2)
q_1=sin(alpha/2)cos(beta_x)
q_2=sin(alpha/2)cos(beta_y)
q_3=sin(alpha/2)cos(beta_z)
Here,beta_x, beta_y and beta_z are the direction cosines of the unit quaternion, i.e. the axis about which I am rotating.
The rotation matrix corresponding to this is as follows: Let's call this R1
1- 2(q_2^2 + q_3^2) 2(q_1 q_2 - q_0 q_3) 2(q_0 q_2 + q_1 q_3)
2(q_1 q_2 + q_0 q_3) 1 - 2(q_1^2 + q_3^2) 2(q_2 q_3 - q_0 q_1)
2(q_1 q_3 - q_0 q_2) 2( q_0 q_1 + q_2 q_3) 1 - 2(q_1^2 + q_2^2)
Now, suppose my rotation matrix is represented by using Euler angles instead: Let's call this R2
R2 rotates a vector by phi around x axis first, then by theta around the y axis and finally by psi around the z axis. Now, suppose my axis of rotation is in the y-z plane.This means that there is no rotation around the x-axis, only a combination of rotations around the y and z axes. This means that phi is zero, which means that R2(3,2) is zero.
Alternatively, this also means that cos(beta_x) is zero, since there is no rotation about the x-axis.This means that q_1 is zero.However, if we look at R1(3,2), it is not zero, unlike R2(3,2).Why are these two representations not the same? What am I missing?