如何装饰一枚硬币?

如何装饰一枚硬币?

我可以画一个圆柱体,但我无法显示硬币。在此处输入图片描述

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

答案1

像这样吗?

一摞硬币

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

相关内容