How to draw an Euler angle rotation sequence with TikZ?
For some lecture notes I want to illustrate successive unit axis rotations using Euler angles. I am quite happy with what I came up with so far:
However, I am failing at drawing the angles in between the successive roations. For example, I would like to have theta_1 between x_I and x' etc. Like so:
where the lines should (ideally...) be arcs, and be labelled.
I achieve the last one of the pictures above with the following code using the tikz-3dplot package.
\begin{tikzpicture}[scale=2.5,tdplot_main_coords]
% Set origin of main (body) coordinate system
\coordinate (O) at (0,0,0);
% Draw main coordinate system
\draw[red, ,->] (0,0,0) -- (1,0,0) node[anchor=north east]{$x_{\mathcal{I}}$};
\draw[red, ,->] (0,0,0) -- (0,1,0) node[anchor=north west]{$y_{\mathcal{I}}$};
\draw[red, ,->] (0,0,0) -- (0,0,1) node[anchor=south]{$z_{\mathcal{I}}$};
% Intermediate frame 1
\tdplotsetrotatedcoords{\zRot}{0}{0}
\draw[tdplot_rotated_coords,->, blue] (0,0,0) -- (1,0,0) node[anchor=north east]{$x'$};
\draw[tdplot_rotated_coords,->, blue] (0,0,0) -- (0,1,0) node[anchor=west]{$y'$};
\draw[tdplot_rotated_coords,->, blue] (0,0,0) -- (0,0,1) node[anchor=west]{$z'$};
% Intermediate frame 2
\tdplotsetrotatedcoords{\zRot}{\yRot}{0}
\draw[,tdplot_rotated_coords,->, green] (0,0,0) -- (1,0,0) node[anchor=
north]{};
\draw[,tdplot_rotated_coords,->, green] (0,0,0) -- (0,1,0)
node[anchor=west]{$y''$};
\draw[,tdplot_rotated_coords,->, green] (0,0,0) -- (0,0,1)
node[anchor=south]{$z''$};
% Rotate to final frame
\tdplotsetrotatedcoords{\zRot}{\yRot}{\xRot}
\draw[thick,tdplot_rotated_coords,->, cyan] (0,0,0) -- (1,0,0)
node[anchor=west]{$x_{\mathcal{B}}$, \textcolor{green}{$x''$}};
\draw[thick,tdplot_rotated_coords,->, cyan] (0,0,0) -- (0,1,0) node[anchor=west]{$y_{\mathcal{B}}$};
\draw[thick,tdplot_rotated_coords,->, cyan] (0,0,0) -- (0,0,1) node[anchor=south]{$z_{\mathcal{B}}$};
\end{tikzpicture}
The full code is pasted here, not to crowd this up too much:
http://pastebin.com/pYW6iyEP
Long story short: How can I draw arcs in between the individual coordinate systems?
For some lecture notes I want to illustrate successive unit axis rotations using Euler angles. I am quite happy with what I came up with so far:
However, I am failing at drawing the angles in between the successive roations. For example, I would like to have theta_1 between x_I and x' etc. Like so:
where the lines should (ideally...) be arcs, and be labelled.
I achieve the last one of the pictures above with the following code using the tikz-3dplot package.
\begin{tikzpicture}[scale=2.5,tdplot_main_coords]
% Set origin of main (body) coordinate system
\coordinate (O) at (0,0,0);
% Draw main coordinate system
\draw[red, ,->] (0,0,0) -- (1,0,0) node[anchor=north east]{$x_{\mathcal{I}}$};
\draw[red, ,->] (0,0,0) -- (0,1,0) node[anchor=north west]{$y_{\mathcal{I}}$};
\draw[red, ,->] (0,0,0) -- (0,0,1) node[anchor=south]{$z_{\mathcal{I}}$};
% Intermediate frame 1
\tdplotsetrotatedcoords{\zRot}{0}{0}
\draw[tdplot_rotated_coords,->, blue] (0,0,0) -- (1,0,0) node[anchor=north east]{$x'$};
\draw[tdplot_rotated_coords,->, blue] (0,0,0) -- (0,1,0) node[anchor=west]{$y'$};
\draw[tdplot_rotated_coords,->, blue] (0,0,0) -- (0,0,1) node[anchor=west]{$z'$};
% Intermediate frame 2
\tdplotsetrotatedcoords{\zRot}{\yRot}{0}
\draw[,tdplot_rotated_coords,->, green] (0,0,0) -- (1,0,0) node[anchor=
north]{};
\draw[,tdplot_rotated_coords,->, green] (0,0,0) -- (0,1,0)
node[anchor=west]{$y''$};
\draw[,tdplot_rotated_coords,->, green] (0,0,0) -- (0,0,1)
node[anchor=south]{$z''$};
% Rotate to final frame
\tdplotsetrotatedcoords{\zRot}{\yRot}{\xRot}
\draw[thick,tdplot_rotated_coords,->, cyan] (0,0,0) -- (1,0,0)
node[anchor=west]{$x_{\mathcal{B}}$, \textcolor{green}{$x''$}};
\draw[thick,tdplot_rotated_coords,->, cyan] (0,0,0) -- (0,1,0) node[anchor=west]{$y_{\mathcal{B}}$};
\draw[thick,tdplot_rotated_coords,->, cyan] (0,0,0) -- (0,0,1) node[anchor=south]{$z_{\mathcal{B}}$};
\end{tikzpicture}
The full code is pasted here, not to crowd this up too much:
http://pastebin.com/pYW6iyEP
Long story short: How can I draw arcs in between the individual coordinate systems?
No comments:
Post a Comment