Google Classroom
GeoGebraGeoGebra Classroom

Harmony

Script

#------------------------ # Auxiliary stuff #------------------------ f(x) = pi/10 * sin(x/2) speed = 3 t = Slider(0, 4pi, 0.01, speed, 180, false, true, false, false) n = 21 blc = "Black" wt = "White" #------------------------ # Rectangles #------------------------ A = (-1, -2) B = (1, -2) C = (1, 5) D = (-1, 5) p = Polygon({A,B,C,D}) O = (0, 0) Execute(Zip("A"+k+" = Rotate( p, f(t+"+k+"/2), O )", k, 1..n)) Execute(Zip("If(Mod("+k+",2)==0, SetColor(A"+k+", wt), SetColor(A"+k+", blc))", k, 1..n)) Execute(Zip("SetFilling( A"+k+", 1)", k, 1..n)) Execute(Zip("SetLineThickness( A"+k+", 0 )", k, 1..n)) #------------------------ # Circles #------------------------ c = Circle((0, -4), 1) Execute(Zip("B"+k+" = Rotate( c, f(t+"+k+"/2), O )", k, 1..n)) Execute(Zip("If(Mod("+k+",2)==0, SetColor(B"+k+", wt), SetColor(B"+k+", blc))", k, 1..n)) Execute(Zip("SetFilling( B"+k+", 1)", k, 1..n)) Execute(Zip("SetLineThickness( A"+k+", 0 )", k, 1..n)) #------------------------ # Settings #------------------------ Lname = {"A", "B", "C", "D", "O", "p", "c", "f", "t", "blc", "wt"} Execute(Zip("SetVisibleInView("+name+", 1, false)", name, Lname)) Delete(Lname) ShowAxes(false) ShowGrid(false) SetBackgroundColor(wt) CenterView(O) StartAnimation(t, true)
Check also this version by Thijs https://www.geogebra.org/m/a3bwacve