Dilation + Rotation of Pentagons
Inspired by the Instituto de Matemáticas:
https://x.com/imate_unam/status/1939693657851859304
Support ❤️
Script Setup
#-- Initial pentagon -- #
poly = Polygon((-4,-4), (4,-4), 5)
#-- Initial variables & list -- #
n = 60
Ln = 0...n
#-- Apply rotation & dillations --#
Execute(Zip("P"+k+"=Dilate(Rotate(poly,"+k+" 6°), 0.9^"+(k)+")", k, Ln))
Execute(Zip("ShowLabel(P"+k+", false)", k, Ln))
#-- Color palette --#
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))
#-- Extra settings --#
m = Slider(0, 60, 1, 1, 140, false, true, false, false)
Execute(Zip("SetConditionToShowObject(P"+k+", "+k+"<= m)", k, Ln))
References
Color Palette Tool & Examples: https://www.geogebra.org/m/x8evngvf