Google ClassroomGoogle Classroom
GeoGebraGeoGebra Classroom

Dilation + Rotation

Inspired by the Instituto de Matemáticas: https://x.com/imate_unam/status/1939693657851859304

Script Setup

poly = Polygon((-4,-4), (4,-4), 5) n = 60 Ln = 0...n Execute(Zip("P"+k+"=Dilate(Rotate(poly,"+k+" 6°), 0.9^"+(k)+")", k, Ln)) Execute(Zip("ShowLabel(P"+k+", false)", k, Ln)) m = Slider(0, 60, 1, 1, 140, false, true, false, false) A = (0.666, 0.56, 0.68) B = (0.718, 0.438, 0.72) C = (0.52, 0.8, 0.52) D = (-0.43, -0.397, -0.083) functionRed(x) = x(A) + x(B) * cos(2pi(x(C) * x + x(D))) functionGreen(x) = y(A) + y(B) * cos(2pi(y(C) * x + y(D))) functionBlue(x) = z(A) + z(B) * cos(2pi(z(C) * x + z(D))) Execute(Zip("SetDynamicColor(P"+k+", Min(1, Max(0, functionRed("+k+"/15) )), Min(1, Max(0, functionGreen("+k+"/15) )), Min(1, Max(0, functionBlue("+k+"/15) )), 1)", k, Ln)) Execute(Zip("SetLayer(P"+k+", "+k+")", k, Ln)) Execute(Zip("SetConditionToShowObject(P"+k+", "+k+"<= m)", k, Ln))

References

Color Palette Tool & Examples: https://www.geogebra.org/m/x8evngvf