答案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}