Checkers board with TikZ

Lukasz Lew asked on TeX.SX:

 
What is the best way to draw a checkers board in TikZ?
 

I’m interested in what is the best way to draw many circular pieces on board. The checker background is not important.

Answer:

I suggest to use a matrix of nodes from the TikZ matrix library.

\documentclass{article} 
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\tikzstyle{ball} = [circle, shading=ball,
    ball color=black!80!white, minimum size=1cm]
\begin{tikzpicture}
  \matrix (m) [matrix of nodes,nodes=ball] {
   {} &    & {} &    & {} &    & {} & \\
      & {} &    & {} &    & {} &    & {} \\
   {} &    & {} &    & {} &    & {} & \\};
  \end{tikzpicture}
\end{document}

Output:

Checkers board with TikZ
Stefan Kottwitz

18. August 2010 by stefan
Categories: Uncategorized | Leave a comment

Leave a Reply

Required fields are marked *