# Tikz draw 2D torus with coil

How can I generate the above image using TikZ (possibly other methods will work if they produce better looking results)?

Thank you to all who can help me.

• like this tex.stackexchange.com/questions/70090/… ? – percusse Oct 18 '17 at 0:21
• I personally would draw something like that in Incscape and then export it to tikz. Also always provide a Minimum Working Example and show your progress. Just asking someone to do your job is rude 😉 – Julian_W Oct 18 '17 at 14:58
• Thanks for the answer @julian_W. I did something in Inkskape, but it got so horrible that I'm embarrassed to post it. I really did not have the slightest idea how to do this .. If you have a very simple example, that I can use it as a starting point, it would help me a lot. thanks again. – N Ericson Oct 18 '17 at 21:36
• I dont see any benefit in using tikz. This is much easier to realize in a graphical editor. – Julian_W Oct 18 '17 at 23:26

Not amazing, and not complete...

\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)
\fill [gray] (0,2) rectangle ++(0.5, -0.25) (0,-2) rectangle ++(0.5, 0.25);
\fill [gray!20, even odd rule]
\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