Harmony

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

Información: Harmony