0

enter image description here

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.

4
  • like this tex.stackexchange.com/questions/70090/… ?
    – percusse
    Commented Oct 18, 2017 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 😉
    – JulianWgs
    Commented Oct 18, 2017 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
    Commented Oct 18, 2017 at 21:36
  • I dont see any benefit in using tikz. This is much easier to realize in a graphical editor.
    – JulianWgs
    Commented Oct 18, 2017 at 23:26

1 Answer 1

4

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) 
  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}

enter image description here

1
  • Thanks for your help, @MarkWibrow. I've been working on it for five days, and what I've got is nowhere near what you've done. It was much better than i could imagine. Very impressive.
    – N Ericson
    Commented Oct 25, 2017 at 3:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .