\documentclass[margin=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes,calc}
\begin{document}
\begin{tikzpicture}
\foreach \x [evaluate=\x as \name using \x*20] in{0,0.05,0.1,0.15,...,5}
\node(\name)[regular polygon, regular polygon sides=12,inner sep=0pt,minimum size=\x cm]{};
\node at(1){test};
\end{tikzpicture}
\end{document}
I get an error saying that there is no shape named "1". The loop works fine (if you add a "draw" option the 12-polygons show up) except for the evaluating part.
edit: I just discovered that 0.05*20 yields 1,00006 instead of 1, so it cannot find a node named 1. Why is that? How can I get 1 from 0,05*20?
int(\x*20)
instead of\x*20
...[count=\xi]
instead. But for your own sake, avoid node names are just numbers.\foreach \x [evaluate={\size=(0.01*\x)};] in {0,...,100} \node (\x) [regular polygon,regular polygon sides=12,inner sep=0pt,minimum size=\size cm,draw=black!\x] {};
so that you have the nodes named with (exact) integers and a (relatively) small error in the size.