![如何在笛卡尔坐标系的 x 轴上表示摆](https://linux22.com/image/359001/%E5%A6%82%E4%BD%95%E5%9C%A8%E7%AC%9B%E5%8D%A1%E5%B0%94%E5%9D%90%E6%A0%87%E7%B3%BB%E7%9A%84%20x%20%E8%BD%B4%E4%B8%8A%E8%A1%A8%E7%A4%BA%E6%91%86.png)
答案1
这可能适合你的需要
\documentclass[border={10}]{standalone}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usetikzlibrary{decorations.pathmorphing}
\tdplotsetmaincoords{70}{125} % view angles
\tdplotsetrotatedcoords{0}{0}{0}
\begin{document}
\begin{tikzpicture}
[tdplot_main_coords,
axis/.style={->,thick,>=stealth}
]
\coordinate (O) at (0,0,0);
\draw[axis] (O) -- (4,0,0) node[anchor=north]{$x$};
\draw[axis] (O) -- (0,4,0) node[anchor=north]{$y$};
\draw[axis] (O) -- (0,0,4) node[anchor=west]{$z$};
\draw[green,thick] (O) -- (0,1,0) -- (1,1,0) -- (1,0,0) -- cycle;
\draw[green,thick] (O) -- (0,1,0) -- (0,1,1) -- (0,0,1) -- cycle;
\draw[green,thick] (O) -- (0,0,1) -- (1,0,1) -- (1,0,0) -- cycle;
\draw[gray, line width=3pt] (.5,0,0) -- (-.5,0,0);
\draw[gray,decoration={aspect=0.4, segment length=2mm, amplitude=1.3mm,coil},decorate] (O) -- (0,0,2.5);
\draw (2,0,0) arc (0:90:2);
\end{tikzpicture}
\end{document}