# Draw squiggly circle with tikz

I am attempting to draw a squiggly circle in order to delineate an area of a figure, but in a manner that emphasizes the arbitrariness of the precise boundary - something like the circle below, but more distorted and random. I cannot figure out a good way of approaching this with TikZ - any suggestions? • The closest earlier post I could find is tex.stackexchange.com/q/508410/194703.
– user194703
Mar 3, 2020 at 16:07
• These solutions work great, thanks - I must have been searching with the wrong terms. Mar 3, 2020 at 18:34

\documentclass[tikz,border=3mm]{standalone}
\begin{document}
\begin{tikzpicture}[declare function={rr=1+0.1*rnd;}]
\draw plot[smooth cycle,variable=\t,samples at={0,45,...,315}] (\t:2*rr);
\end{tikzpicture}
\end{document} You can make it a pic, and thus make the "randomness" parameters like amplitude or the number of samples.

\documentclass[tikz,border=3mm]{standalone}
\begin{document}
\begin{tikzpicture}[pics/random circle/.style={code={
\tikzset{random circle/.cd,#1}
\def\pv##1{\pgfkeysvalueof{/tikz/random circle/##1}}%
\pgfmathsetmacro{\nextt}{360/\pv{samples}}
\pgfmathsetmacro{\lastt}{360-\nextt}
\draw plot[smooth cycle,variable=\t,samples at={0,\nextt,...,\lastt}]
samples/.initial=8]
\path (0,0) pic{random circle} • How would I make the "squiggly circles" thicker. I tried adding thick, and even very thick, as in: \draw plot[very thick,smooth cycle,variable=\t,samples at={0,\nextt,...,\lastt}] .... However, this seems to have no effect. Mar 3, 2020 at 17:29
• @murray You add very thick to the options of plot. However, you need \draw[very thick] plot[smooth cycle,variable=\t,samples at={0,\nextt,...,\lastt}] .... Yet, if you use the pic, you only need pic[very thick]{random circle}.