0

How to draw a three-dimensional rotation around some angle about some axis as shown in the figure on the right below with the tikz library.

enter image description here

Edit

This is the code that I have so far, I have the main axes from the "original" coordinate system, but I am confused about adding the curved lines with the dashed vectors

\documentclass[border=2pt]{standalone}

% Drawing
\usepackage{tikz}
\usepackage{tikz-3dplot}

% Styles
\tikzset{>=latex}

\begin{document}

\tdplotsetmaincoords{60}{110}
\begin{tikzpicture}[scale=3, tdplot_main_coords]
    \coordinate (O) at (0,0,0);
    \draw[thick,->, blue] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$};
    \draw[thick,->, red] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};
    \draw[thick,->, green] (0,0,0) -- (0,0,1) node[anchor=south]{$z$};
    \tdplotsetcoord{P}{1}{30}{60}
    \draw plot [mark=*, mark size=0.2] (P) node [right] {\scriptsize$(c_x, c_y, c_z)$};
    \draw[->, thick] (O) -- (P) node [midway, below right] {$\bf{c}$};
    \tdplotsetthetaplanecoords{60}
    \tdplotdrawarc[tdplot_rotated_coords]{(0,0,0)}{0.4}{0}%
        {30}{anchor=south}{$\phi$}
\end{tikzpicture}

\end{document}
2
  • 1
    Welcome to TSE. What did you try? Aug 2 at 19:10
  • I edited the question, I have the main axes, just confused on adding the curved vectors
    – Xenconic
    Aug 2 at 19:21

1 Answer 1

0

I am not sure whether this is what you're after, but it would be probably easiest for you to just use the same macros you already have to draw the dashed arrows and the arc as well.

Just define new coordinates with smaller angles between the u axis and the arrow c, such as \tdplotsetcoord{P1}{1}{10}{60}, and then draw an arrow from the origin to these coordinates, for example using \draw[->, dashed, green!66!black] (O) -- (P1);.

For the arc, you can use the same macro that you already use to label the angle. Just increase the radius and leave the arguments for the labels empty.

\documentclass[border=2pt]{standalone}

% Drawing
\usepackage{tikz}
\usepackage{tikz-3dplot}

% Styles
\tikzset{>=latex}

\begin{document}

\tdplotsetmaincoords{60}{110}
\begin{tikzpicture}[scale=3, tdplot_main_coords]

    \coordinate (O) at (0,0,0);
    \draw[thick,->, blue] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$};
    \draw[thick,->, red] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};
    \draw[thick,->, green] (0,0,0) -- (0,0,1) node[anchor=south]{$z$};

    \tdplotsetcoord{P1}{1}{10}{60}
    \draw[->, dashed, green!66!black] (O) -- (P1);

    \tdplotsetcoord{P2}{1}{20}{60}
    \draw[->, dashed, green!33!black] (O) -- (P2);

    \tdplotsetcoord{P}{1}{30}{60}
    \draw plot [mark=*, mark size=0.2] (P) node [right] {\scriptsize$(c_x, c_y, c_z)$};
    \draw[->, thick] (O) -- (P) node [midway, below right] {$\bf{c}$};
    
    \tdplotsetthetaplanecoords{60}
    \tdplotdrawarc[tdplot_rotated_coords]{(0,0,0)}{0.4}{0}%
        {30}{anchor=south}{$\phi$}
        
    \tdplotdrawarc[tdplot_rotated_coords, gray]{(0,0,0)}{1}{0}%
        {30}{}{}
        
\end{tikzpicture}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.