Graphics, Figures & TablesCircular Arrow in the x-y Plane

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
kmath
Posts: 7
Joined: Sat Apr 27, 2013 2:54 am

Circular Arrow in the x-y Plane

Post by kmath »

Hello everyone,

I currently have this.

Code: Select all

\begin{tikzpicture}[
  cube/.style={very thick,black},
  grid/.style={very thin,gray},
  axis/.style={->,blue,thick}
]
  %draw the axes
  \draw[axis] (0,0,0) -- (6,0,0) node[anchor=west]{$y$};
  \draw[axis] (0,0,0) -- (0,6,0) node[anchor=west]{$z$};
  \draw[axis] (0,0,0) -- (0,0,6) node[anchor=west]{$x$};

  %draw the top and bottom of the cube
  \draw[cube] (0,0,0) -- (0,0,4) -- (4,0,4) -- (4,0,0) -- cycle;
  \draw[axis] (2,0,2) -- (2,4,2) node[anchor=west]{$v$};
\end{tikzpicture}
It's a square in the x-y plane and vector v running perpendicular to it. I'd like to add a circular arrow around v indicating the plane is rotating around v. Any ideas?

Thanks,
Kevin

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Circular Arrow in the x-y Plane

Post by localghost »

It's easier to use tikz-3dplot here. The output is attached.

Code: Select all

\documentclass[11pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{tikz,tikz-3dplot}

\begin{document}
  \tdplotsetmaincoords{75}{120}
  \begin{tikzpicture}[
    tdplot_main_coords,
    >=stealth,
    cube/.style={very thick,black},
    grid/.style={very thin,gray},
    axis/.style={->,blue,thick}
  ]
    \draw[axis] (0,0,0) -- (6,0,0) node[black,anchor=north east]{$x$};
    \draw[axis] (0,0,0) -- (0,6,0) node[black,anchor=north west]{$y$};
    \draw[axis] (0,0,0) -- (0,0,6) node[black,anchor=south]{$z$};

    \draw[cube] (0,0,0) -- (4,0,0) -- (4,4,0) -- (0,4,0) -- cycle;
    \tdplotdrawarc[->]{(2,2,0)}{0.5}{45}{375}{}{}
    \draw[axis] (2,2,0) -- (2,2,4) node[black,midway,anchor=west]{$\vec{v}$};
  \end{tikzpicture}
\end{document}

Thorsten
Attachments
ttmp.png
ttmp.png (2.57 KiB) Viewed 5432 times
kmath
Posts: 7
Joined: Sat Apr 27, 2013 2:54 am

Re: Circular Arrow in the x-y Plane

Post by kmath »

Wow. You owned that. Is there a "thumbs up" button to give you a personal point or is it enough to click the "checkmark?"
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Circular Arrow in the x-y Plane

Post by localghost »

kmath wrote:[…] Is there a "thumbs up" button to give you a personal point or is it enough to click the "checkmark?"
Thanks for the appreciation. Marking the topic as solved by accepting the answer that led you to the solution is absolutely sufficient. So you have done everything correctly.
Post Reply