\DocumentMetadata{}
\documentclass[border=5mm]{standalone}
\usepackage{geometry}
\geometry{paperwidth=18cm,paperheight=21cm,margin=1cm}
\usepackage{animate}
\usepackage{pst-spirograph}
\addtopsstyle{gridstyle}{gridlabels=0pt}

\begin{document}

\psset{unit=0.5cm}
\begin{animateinline}[
  width=0.9\linewidth,begin={\begin{pspicture}(-18,-18)(18,18)},end={\end{pspicture}},palindrome,controls]{5}
\multiframe{181}{i=0+10}{%
\psgrid[style=gridstyleA]%
\ifnum\i=181 \psset{gearwheels=false}\fi
\psSpirograph[Z1=60,Z2=24,m=0.2,linewidth=0.025,TypeA=false,
    linecolor=blue,fillstyle=solid,opacity=0.75,polarangle=\i,circles=false,thetamax=\i,curvecolor=red,curvewidth=2pt,HolePos=1.7,
    gearwheels=false,
    circles]}
\end{animateinline}

\end{document}

