Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[11pt]{standalone}
- usepackage[utf8]{inputenc}
- usepackage[T1]{fontenc}
- usepackage{tikz}
- usepackage{pgfplots}
- % draw a circle of radius #1 with randomness #2
- newcommandirregularcircle[2]{%
- pgfextra {%
- pgfmathsetseed{42}%
- pgfmathsetmacrolen{(#1)+rand*(#2)}}
- +(0:len pt)
- foreach a in {20,40,...,340}{
- pgfextra {pgfmathsetmacrolen{(#1)+rand*(#2)}}
- -- +(a:len pt)
- } -- cycle
- }
- begin{document}
- begin{tikzpicture}[auto]
- begin{axis}[%
- axis x line=center,
- axis y line=center,
- xmin=-8, xmax=8,
- ymin=-8, ymax=8,
- ]
- draw[rounded corners=2mm, fill=black, opacity=0.2] (axis cs:0,0) irregularcircle{2cm}{2mm};
- end{axis}
- end{tikzpicture}
- end{document}
Add Comment
Please, Sign In to add comment