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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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 »

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 5550 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