因此,我尝试从 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}