I got inspired and made a similar effect is desmos
f(theta, t) = 0.1 max(cos(theta + t), 0)^2 sin(8 theta)
r = 1 + f(theta, t)
r = 1 - f(theta, t)
where: 0 <= theta <= 2 pi
t = 0
where: 0 <= t < 2 pi
It's not quite right though, the sin(8 theta)
part needs to phase shift, but basing it off of t
messes up the perfect loop.
At that point I would reach for code, which also lets you save the animation. Using something like p5.js (editor.p5js.org) you can easily draw graphics and save each frame as its own image