Как нарисовать дугу в 3D с помощью tikzpicture в плоскости xy?

Как нарисовать дугу в 3D с помощью tikzpicture в плоскости xy?

Итак, я пытаюсь нарисовать дугу от оси x до оси y, чтобы символизировать векторное произведение между r и p, и я использую код ниже, но, как вы видите, он не дает мне дугу, которую я хотел бы. Как мне это сделать?

\begin{tikzpicture}
\draw (0,0,0) node[above left] {};
\draw[thick, ->] (0,0,0) -- (2,0,0) node[anchor=north west]{$y$};
\draw[thick, ->] (0,0,0) -- (0,2,0) node[anchor=south west]{$z$};
\draw[thick, ->] (0,0,0) -- (0,0,2) node[anchor=south east]{$x$};

\draw[thick, ->,green] (0,0,0) -- (1,0,0) node[anchor=north east]
{$\vec{p}$};
\draw[thick, ->,red] (0,0,0) -- (0,1,0) node[anchor=north west]{$\vec{L}$};
\draw[thick, ->,blue] (0,0,0) -- (0,0,1) node[anchor=south east]{$\vec{r}$};
\draw[->] (0,0,0.5) arc (0:90:0.5cm);
\end{tikzpicture}

А вот и изображение:

введите описание изображения здесь

решение1

Один из способов — загрузить пакет tikz-3dplot.

\documentclass[tikz]{standalone}
\usepackage{tikz-3dplot}
\begin{document}
\begin{tikzpicture}
\tdplotsetmaincoords{70}{110}
\draw (0,0,0) node[above left] {};
\draw[thick, ->] (0,0,0) -- (2,0,0) node[anchor=north west]{$y$};
\draw[thick, ->] (0,0,0) -- (0,2,0) node[anchor=south west]{$z$};
\draw[thick, ->] (0,0,0) -- (0,0,2) node[anchor=south east]{$x$};

\draw[thick, ->,green] (0,0,0) -- (1,0,0) node[anchor=north east]
{$\vec{p}$};
\draw[thick, ->,red] (0,0,0) -- (0,1,0) node[anchor=north west]{$\vec{L}$};
\draw[thick, ->,blue] (0,0,0) -- (0,0,1) node[anchor=south east]{$\vec{r}$};
\tdplotdrawarc{(0,0,0)}{0.5}{0}{110}{anchor=north}{$\phi$}
\end{tikzpicture}
\end{document}

введите описание изображения здесь

Если вы не хотите загружать этот пакет, вы всегда можете подделать кривую.

\documentclass[tikz,border=3pt]{standalone}
\begin{document}
\begin{tikzpicture}
\draw (0,0,0) node[above left] {};
\draw[thick, ->] (0,0,0) -- (2,0,0) node[anchor=north west]{$y$};
\draw[thick, ->] (0,0,0) -- (0,2,0) node[anchor=south west]{$z$};
\draw[thick, ->] (0,0,0) -- (0,0,2) node[anchor=south east]{$x$};

\draw[thick, ->,green] (0,0,0) -- (1,0,0) node[anchor=north east]
{$\vec{p}$};
\draw[thick, ->,red] (0,0,0) -- (0,1,0) node[anchor=north west]{$\vec{L}$};
\draw[thick, ->,blue] (0,0,0) -- (0,0,1) node[anchor=south east]{$\vec{r}$};
\draw[->] (0,0,0.6) arc [start angle=-90,end angle=0,x radius=0.8,y radius=0.24];
\end{tikzpicture}
\end{document}

введите описание изображения здесь

Связанный контент