![使用 tikz 绘制波浪圆](https://linux22.com/image/409020/%E4%BD%BF%E7%94%A8%20tikz%20%E7%BB%98%E5%88%B6%E6%B3%A2%E6%B5%AA%E5%9C%86.png)
答案1
怎么样
\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}
您可以将其制作成图片,从而制作像振幅或样本数这样的“随机性”参数。
\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}]
(\t:\pv{radius}+rnd*\pv{amplitude});
}},random circle/.cd,radius/.initial=1,amplitude/.initial=0.1,
samples/.initial=8]
\path (0,0) pic{random circle}
(4,0) pic[blue]{random circle={radius=2,amplitude=0.3,samples=12}}
(0,-4) pic[red]{random circle={radius=2,amplitude=0.5,samples=16}};
\end{tikzpicture}
\end{document}