How to draw these coins?

A little bit cleaner.

\documentclass{scrartcl}

\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}

\begin{tikzpicture}
  \foreach \n in {1,2,3,4}
    \foreach \m in {1,...,\n}
      \node[circle,draw,minimum size=1cm] at ($(60:\m cm)+(-\n cm,0)$) {K};
\end{tikzpicture}

\end{document}

Is something like this what you want?

\documentclass[tikz]{standalone}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\draw[red] (0,0)--(3,0);
\draw[red] (0,0)--(60:3cm);
\draw[red] (3,0)--++(120:3cm);

\node[circle,draw,minimum size=1cm](a-1) {K};
\node[circle,draw,minimum size=1cm](b-1) at (60:1cm) {K};
\node[circle,draw,minimum size=1cm](c-1) at (60:2cm) {K};
\node[circle,draw,minimum size=1cm](d-1) at (60:3cm) {K};

\node[circle,draw,minimum size=1cm,right=0mm of a-1](a-2){K};
\node[circle,draw,minimum size=1cm,right=0mm of a-2](a-3){K};
\node[circle,draw,minimum size=1cm,right=0mm of a-3](a-4){K};

\node[circle,draw,minimum size=1cm,right=0mm of b-1](b-2){K};
\node[circle,draw,minimum size=1cm,right=0mm of b-2](b-3){K};

\node[circle,draw,minimum size=1cm,right=0mm of c-1](c-2){K};

\end{tikzpicture}
\end{document}

enter image description here


Stacking tikz balls.

\documentclass{article}
\usepackage[margin=15pt]{geometry}
\usepackage[usestackEOL]{stackengine}
\usepackage{tikz}
\usetikzlibrary{shapes,backgrounds}
%\usepackage{verbatim}

\begin{document}
\pagestyle{empty}
\savestack{\K}{%
  \begin{tikzpicture}
    \draw (0,0) circle (1cm) node {\Huge\sffamily\bfseries K};
  \end{tikzpicture}}
\savestack{\C}{%
  \begin{tikzpicture}
    \draw (0,0) circle (1cm) node {\Huge\sffamily\bfseries C};
  \end{tikzpicture}}

\begin{center}
\setstackgap{L}{1.732cm}% =2cm * sin(60)
\Longstack{\K \\ \K\K \\ \K\K\K  \\ \K\K\K\K}
\qquad
\Longstack{\C \\ \C\C \\ \C\C\C  \\ \C\C\C\C}
\end{center}  
\end{document}

enter image description here


...and just to show some added stacking flexibility:

\documentclass{article}
\usepackage[margin=15pt]{geometry}
\usepackage[usestackEOL]{stackengine}
\usepackage{tikz}
\usetikzlibrary{shapes,backgrounds}
%\usepackage{verbatim}
\begin{document}
\pagestyle{empty}
\savestack{\K}{%
  \begin{tikzpicture}
    \draw (0,0) circle (1cm) node {\Huge\sffamily\bfseries K};
  \end{tikzpicture}}
\savestack{\C}{%
  \begin{tikzpicture}
    \draw (0,0) circle (1cm) node {\Huge\sffamily\bfseries C};
  \end{tikzpicture}}

\begin{center}
\setstackgap{L}{1.732cm}% =2cm * sin(60)
\Longstack{\K \\ \K\K \\ \K\K\K  \\ \K\K\K\K}
\qquad
\Longstack{\C \\ \C\C \\ \C\C\C  \\ \C\C\C\C}

\bigskip
\setstackgap{L}{2cm}% =2cm * sin(90)
\Longstack[l]{\K \\ \C\C \\ \K\K\K  \\ \C\C\C\C}
\qquad
\Longstack[r]{\C \\ \K\K \\ \C\C\C  \\ \K\K\K\K}

\end{center}  
\end{document}

enter image description here

Tags:

Tikz Pgf