Tikz 用线圈绘制二维圆环

Tikz 用线圈绘制二维圆环

在此处输入图片描述

如何使用 TikZ 生成上述图像(如果其他方法能产生更好的效果,它们也可能有效)?

感谢所有能帮助我的人。

答案1

并不惊艳,也不完整......

\documentclass[tikz,border=5]{standalone}
\begin{document}
\begin{tikzpicture}[line cap=round, line join=round]
\fill [gray!50] 
  (-2,-.5) -- (3,-.5) arc (-90:90:.375 and .5) -- (-2,.5) arc (90:270:.375 and .5);
\fill [gray, even odd rule] (0.5,0) 
  ellipse [x radius=1.75, y radius=2] ellipse [x radius=1, y radius=1.25];
\fill [gray] (0,2) rectangle ++(0.5, -0.25) (0,-2) rectangle ++(0.5, 0.25);
\fill [gray!20, even odd rule] 
  ellipse [x radius=1.75, y radius=2] ellipse [x radius=1, y radius=1.25];
\foreach \i in {-90,-67.5,...,67.5}
  \draw [ultra thick, rounded corners=0.125cm] 
    (\i:1 and 1.25) -- (\i:1.75 and 2) -- +(0.5,0);
\foreach \i in {120,144.5,...,247.5}
  \draw [ultra thick, rounded corners=0.125cm] 
    (\i:1.75 and 2) -- (\i:1 and 1.25) -- +(0.5,0);
\fill 
  (2,4) coordinate (a) circle [radius=.1] 
  (2,3) coordinate (b) circle [radius=.1];
\draw [ultra thick] (90:1 and 1.25) |- (a);
\draw [ultra thick] (67.5:1.75 and 2) ++(0.5, 0) |- (b);
\fill [gray!50] (0,-.5) rectangle ++(-2,1);
\fill [gray] (-2,0) ellipse [x radius=0.375, y radius=.5];
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容