Google Classroom
GeoGebraGeoGebra Classroom

Time traveling

GIF

GIF
Note: Download for better performance in the animation. :)

Script

n = Slider(1, 20, 1, 1, 160, false, true, false, false) p = Slider(0, 1, 0.1, 1, 160, false, true, false, false) r = Slider(0.5, 2, 0.1, 1, 160, false, true, false, false) R = Slider(0.5, 2, 0.1, 1, 160, false, true, false, false) speed = 0.5 t = Slider(0, 2*pi, 0.01, speed, 160, false, true, false, false) fx(x, y) = (R - r cos(x)) * cos(p * x + y) + R fy(x, y) = (R - r cos(x)) * sin(p * x + y) fz(x, y) = r * sin(x) O = (0, 0, 0) O1 = Translate(O, Vector(O, (R, 0,0))) O2 = Rotate(O1, -pi/2, yAxis) l1 = Line(O2, xAxis) #White 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) #Blue 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) #Enjoy! :)