[Physics] Euler angle rotation – active/passive

conventionsreference framesrotation

I have a very simple problem, that I cannot wrap my head around and is hurting my brain. I have a very simple example of the problem, please consider the the figure below:

1) Starting position, 2) after first rotation, 3) after second rotation

In the first picture, you see a right handed reference frame, with a body defined in it and a point P on that body. What I want to do is calculate the position of this point P after two consecutive rotations, in the initial reference frame, sounds simple right? 🙂 :

1)Let's assume $P=\begin{bmatrix}-1 & 4 & 0\end{bmatrix}^T$ and we start with a negative rotation (-45 degrees)around the Y-axis, yielding the rotation matrix
$$R_y(-0.5\pi)=\begin{bmatrix}\cos(\theta) & 0 & \sin(\theta)\\
0 & 1 & 0\\
-\sin(\theta) & 0 & \cos(\theta)
\end{bmatrix}=\begin{bmatrix}0.707 & 0 & -0.707\\
0 & 1 & 0\\
0.707 & 0 & 0.707
\end{bmatrix}$$
Multiplying gives $$R_yP=\begin{bmatrix}-0.707 \\ 4 \\-0.707\end{bmatrix} $$ So far, so good, as can be seen in part 2 of the figure. Where these are indeed the coordinates of the point in the reference frame of figure 1.

2) Apply a 180 degree rotation around the $Z'$ axis
$$R_z({\pi})=\begin{bmatrix}\cos(\theta) & -\sin(\theta) & 0\\ \sin(\theta) &\cos(\theta)& 0\\ 0& 0 &1\end{bmatrix}=\begin{bmatrix}-1 & 0 & 0\\ 0 &-1& 0\\ 0& 0 &1\end{bmatrix}$$
Multiplying again gives $$R_zR_yP=\begin{bmatrix} 0.707 \\-4 \\-0.707\end{bmatrix}$$

Which is exactly where my problem lies, since this answer is wrong. The z-component should be positive as can be seen in part 3 of the figure (In the original reference frame!). I see that $R_z$ can never cause a sign change on the z-component, but I don't see where I go wrong.

I have been reading all I could find on active and passive rotation, space fixed vs body fixed rotations, but I can't seem to figure out where I assume something wrong.
I'm performing an active rotation, so I believe I take the correct definitions of the rotation matrices, nor does transposing them solve the problem.
I'm also applying a body-fixed rotation, hence using the pre multiplication is correct, even though switching the order of multiplication around does give me the correct answer.

Can somebody explain to me where in my assumptions I am going wrong? It seems so simple, but I can't seem to pinpoint where my error is and I will probably facepalm myself from stupidity 🙂 Thanks a bunch!

Best Answer

The points seem correct, but the drawings are a bit off from the text.

Rotation matrises rotate the point along the axis they operate. That means that rotation matrix y $R_y$ does not change the y-coordinate. Also, rotation matrix z $R_z$ does not change the z-coordinate.

In the drawings you are rotating the axis and the blue box. You should rotate on one of those. The mistake is between 2 and 3 as the axes are pointing in wrong direction respect to the box. Keep the axis the same, like in fig 1, and when rotating the box the second time use the z-axis of fig 1.

In this version of the drawing you are rotating a point that is always in x-y plane. The point in second figure seems to be (-1,4,0) not (-0.707, -4, -0.707) as you say in the text.