I'm trying to draw a set of 64 disks on a grid 8x8. Like this figure:
I have so far:
I want to automate this task with a for loop for example, I dont know. See my code, this is brutal force code, one line for each disk
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=3]
\draw[step=.5cm,gray,very thin] (-2.0,-2.0) grid (2.0,2.0);
\draw (-1.75,1.75) circle (0.15cm);
\draw (-1.25,1.75) circle (0.15cm);
\draw (-0.75,1.75) circle (0.15cm);
\draw (-0.25,1.75) circle (0.15cm);
\draw (0.25,1.75) circle (0.15cm);
\draw (0.75,1.75) circle (0.15cm);
\draw (1.25,1.75) circle (0.15cm);
\draw (1.75,1.75) circle (0.15cm);
\end{tikzpicture}
\end{document}
\foreach
command! Note that you might want to use the optional argumenthelp lines
when drawing the grid instead ofgray,very thin
: it's semantically more correct even if result is the same.