I want do draw some random tiny circles inside a bigger one.
I use rnd
at both coordinates (polar): ({30*rnd}:{2*rnd})
-- here I want to have tiny circles in the range [0;30] degrees. The ouput is random but not limited to 30 degrees.
Then I want a constant angle: ({30}:{2*rnd})
. The output doesn't make any sense. Both coordinates are random.
Finally I want constant distance to the center: ({30*rnd}:{2})
. Everything OK by the looks of it: it's an arc limited by the 30 degrees.
Here's the code:
\documentclass{article}
\usepackage{tikz}
\usepackage{scalefnt}
\usetikzlibrary{arrows,calc, positioning}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{2mm}
\begin{document}
\begin{tikzpicture}
\draw (0,0) circle(3);
\draw[dashed] (0:0) -- (30:3);
\pgfmathsetseed{\pdfuniformdeviate 1000000};
\foreach \iter in {1,2,...,50} {
\draw[fill=red] ({30*rnd}:{2*rnd}) circle(0.01);
}
\end{tikzpicture}
\begin{tikzpicture}
\draw (0,0) circle(3);
\draw[dashed] (0:0) -- (30:3);
\pgfmathsetseed{\pdfuniformdeviate 1000000};
\foreach \iter in {1,2,...,50} {
\draw[fill=red] ({30}:{2*rnd}) circle(0.01);
}
\end{tikzpicture}
\begin{tikzpicture}
\draw (0,0) circle(3);
\draw[dashed] (0:0) -- (30:3);
\pgfmathsetseed{\pdfuniformdeviate 1000000};
\foreach \iter in {1,2,...,50} {
\draw[fill=red] ({30*rnd}:{2}) circle(0.01);
}
\end{tikzpicture}
\end{document}
Any ideas?