Euler Angles Calculator
Not sure how to use? Refer the How to use section
How to use
Inputs:
The calculator takes as input two vectors and one field of convention to be followed (not all conventions have been added yet). The two vectors are:
- The final $x$-axis in the coordinates of the initial frame. For example, if we want the final $x$-axis to be directed along the the $z$-axis of the initial frame, then we would input this vector as: $$ \vec{x} = 0\,\hat{i} + 0\,\hat{j} + a\,\hat{k}, $$ where, $a$ is any constant depending on the context.
-
A reference vector (denoted here as $\vec{R}$) on the final $xy$-plane, again in the coordinates of the initial frame. Since, only the final $x$-axis can't determine all other axes of any orientation, we need a reference vector to determine the complete state.
For example, if we want the final orientation to be such that the final $x$-axis is along the direction $3\,\hat{i} + 5\,\hat{j} + 4\,\hat{k}$ and the final $y$-axis to be along the orginal, then the reference vector on the final $xy$-plane can simply be $y$-axis itself i.e. $$ \vec{R} = 0\,\hat{i} + b\,\hat{j} + 0\,\hat{j}, $$ where, $b$ is some arbitrary constant.
To emphasize the point more clearly consider the diagram shown below. Here, the intial orientation is shown in blue color and the final orientation of the frame is shown in red.
The final $x$-axis (say, $X$-axis) is in the direction $(x_1, x_2, x_3)$ with resepct to initial frame. Further, if $Y$-axis is in the direction $(y_1, y_2, y_3)$ with respect to the initial frame, then we can take the reference vector $R$ (shown in green in the diagram) to be any vector on the final $xy$-plane (as shown in figure): $$ \begin{align} \vec{R} &= c_1\vec{X} + c_2\vec{Y} \\[4px] &= (c_1x_1 + c_2y_1) + (c_1x_2 + c_2y_2) + (c_1x_3 + c_2y_3) \end{align} $$
Outputs:
The calculator gives four angles as outputs, three of which $(\alpha, \beta, \gamma)$ depends on the convention chosen, and the last one, $\theta$ doesn't. And, the rotation matrix for the output euler angles in the chosen convention.
-
The angles $\alpha$, $\beta$, $\gamma$ are the euler angles for the given convention, which is self explanatory. If you want to learn what they mean exactly in each convention, refer to the about section.
-
The angle $\theta$ is shown in the figure. It represents the angle between the $X$-axis and the reference vector $\vec{R}$. A positive $\theta$ indicates that the reference vector $\vec{R}$ is towards the $Y$-axis in the $XY$-plane generated finally else towards the negative $Y$-axis, with respect to the $X$-axis. It is not directly related with the required euler angles but is given for convenience, in case it is needed.
About Euler Angles
In many of the applications today (including aircraft, space vehicle orientation, frames shifting in Physics, computer graphics, etc.), we find Euler Angles decribing the orientation of the frame in consideration. After all, that is for what Euler angles are. As is clear, these was introduced by Leonhard Euler to describe orientation of a rigid body.
Any orientation can be reached using the rotation by Euler Angles, $\alpha$, $\beta$ and $\gamma$ (these are the notations which we would use from here on). These rotations can be extrinsic (rotation about the original axes i.e. the initial $x$, $y$ and $z$-axes) or intrinsic (rotation about axes of successively new frames after each rotation). Now, there are many prevalent conventions for these angles and they all work for any given situation. One of them is $\text{ZXZ}$ (intrinsic). This means that we first rotate the frame about the initial $z$-axis by angle $\alpha$, then we rotate the resulting frame about the $x$-axis (say, $x'$) of the resulting frame by angle $\beta$ and finally about the $z$-axis (say, $z''$) of the second resulting frame by angle $\gamma$. The sequence is depicted in the figure below.
The $x'$-axis ($x$-axis after the first rotation) is called the line of nodes (denoted by $N$) in the figure above.
Another convention is the $\text{ZYZ}$ (intrinsic) convention (refer Figure 2). Similar to what we said above, here we first rotate the frame about the initial $z$-axis by angle $\alpha$, then we rotate the resulting frame about the $y$-axis (say, $y'$) of the resulting frame by angle $\beta$ and finally about the $z$-axis (say, $z''$) of the second resulting frame by angle $\gamma$..
Again, the $y'$-axis ($y$-axis after the first rotation) is called the line of nodes (denoted by $N$) in the above figure.