Time traveling

GIF
[b]Note:[/b] Download for better performance in the animation. :)
Script
n = Slider(1, 20, 1, 1, 160, false, true, false, false)[br]p = Slider(0, 1, 0.1, 1, 160, false, true, false, false)[br]r = Slider(0.5, 2, 0.1, 1, 160, false, true, false, false)[br]R = Slider(0.5, 2, 0.1, 1, 160, false, true, false, false)[br][br]speed = 0.5[br]t = Slider(0, 2*pi, 0.01, speed, 160, false, true, false, false)[br][br]fx(x, y) = (R - r cos(x)) * cos(p * x + y) + R[br]fy(x, y) = (R - r cos(x)) * sin(p * x + y)[br]fz(x, y) = r * sin(x)[br][br]O = (0, 0, 0)[br]O1 = Translate(O, Vector(O, (R, 0,0)))[br]O2 = Rotate(O1, -pi/2, yAxis)[br]l1 = Line(O2, xAxis)[br][br]#White[br]W1 = Sequence(Rotate(Rotate(Surface(fx(u, v), fy(u, v), fz(u, v), u, 0, 2π, v, i + π / n, i + 2π / n), -pi/2, yAxis), -t, l1), i, 0, 2π, 2π / n)[br][br]#Blue[br]B1 = Sequence(Rotate(Rotate(Surface(fx(u, v), fy(u, v), fz(u, v), u, 0, 2π, v, i, i + π / n), -pi/2, yAxis), -t, l1), i, 0, 2π, 2π / n)[br][br]#Enjoy! :)

Informação: Time traveling