0

I can draw a cylinder, but I can't display the coins.enter image description here

\documentclass{article}
\usepackage[margin=15mm]{geometry}
\usepackage{tikz}
\usetikzlibrary{shadings}

\begin{document}
\begin{center}
\begin{tikzpicture}
\fill[top color=gray!50!black,bottom color=gray!10,middle color=gray,shading=axis,opacity=0.25] (0,0) circle (2cm and 0.5cm);
\fill[left color=gray!50!black,right color=gray!50!black,middle color=gray!50,shading=axis,opacity=0.25] (2,0) -- (2,6) arc (360:180:2cm and 0.5cm) -- (-2,0) arc (180:360:2cm and 0.5cm);
\fill[top color=gray!90!,bottom color=gray!2,middle color=gray!30,shading=axis,opacity=0.25] (0,6) circle (2cm and 0.5cm);
\draw (-2,6) -- (-2,0) arc (180:360:2cm and 0.5cm) -- (2,6) ++ (-2,0) circle (2cm and 0.5cm);
\draw[densely dashed] (-2,0) arc (180:0:2cm and 0.5cm);
\end{tikzpicture}
\end{center}
\end{document}
3
  • 3
    What are “stakel coins”?
    – egreg
    Dec 23, 2014 at 23:11
  • 1
    And what would you like to dress them in?
    – cfr
    Dec 23, 2014 at 23:13
  • 1
    Are you looking for something like stacked coins/disks?
    – knut
    Dec 23, 2014 at 23:16

1 Answer 1

4

Something like this?

stack of coins

\documentclass[tikz, border=10pt]{standalone}
\usetikzlibrary{shadings,calc,patterns}

\begin{document}
  \begin{tikzpicture}
    \fill [left color=gray!50!black, right color=gray!50!black, middle color=gray!50, shading=axis, opacity=0.25]
      (2,0) coordinate (a)
      -- (2,6) coordinate (b)
      arc (360:180:2cm and 0.5cm) coordinate (c)
      -- (-2,0) coordinate (d)
      arc (180:360:2cm and 0.5cm);
    \fill[top color=gray!90!, bottom color=gray!2, middle color=gray!30, shading=axis, opacity=0.25] (0,6) coordinate (c1) circle (2cm and 0.5cm);
    \foreach \i in {0,1,...,19} \draw  ($(d)!\i/20!(c)$) coordinate (f\i) arc (180:360:2cm and 0.5cm) ($(a)!\i/20!(b)$) coordinate (g\i);
    \path [pattern=north east lines, pattern color=gray!75] (c) -- (d) arc (180:360:2cm and 0.5cm) -- (b) arc (360:180:2cm and 0.5cm);
    \draw [black]
      (c) -- (d) arc (180:360:2cm and 0.5cm) -- (b)
      (c -| c1) circle (2cm and 0.5cm);
  \end{tikzpicture}
\end{document}

You must log in to answer this question.

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