Painting with random triangles
Script
speed = 1
n = Slider(1, 500, 1, speed, 200, false, true, false)
SetValue(n, 500)
SetVisibleInView(n, 1, false)
Ln = 1..500
randomAngle = Zip(RandomUniform(0, 2pi), k, Ln)
randomFactor = Zip(RandomUniform(1/2, 3/2), k, Ln)
P1 = (0, 0)
SetVisibleInView(P1,1, false)
pointsP2 = Zip((random(), random()), k, Ln)
pointsP3 = Zip((-3+6*random(), -3+6*random()), k, Ln)
#polyList = Zip( Rotate( Dilate( Polygon(P1, P2, P3), factor ), angle), P2, pointsP2, P3, pointsP3, factor, randomFactor, angle, randomAngle)
Execute( Zip( "A"+k+" = Rotate( Dilate( Polygon(P1, Element(pointsP2, "+k+"), Element(pointsP3, "+k+")), Element(randomFactor, "+k+") ), Element(randomAngle, "+k+"))" , k, Ln) )
Execute(Zip("SetDynamicColor(A"+k+", 0.1, 0.2, "+k+"/500, 1-"+k+"/500)", k, Ln))
Execute(Zip("ShowLabel(A"+k+", false)", k, Ln))
Execute(Zip("SetLineThickness(A"+k+", 0)", k, Ln))
Execute(Zip("SetLayer(A"+k+", 501-"+k+")", k, Ln))
Execute(Zip("SetConditionToShowObject(A"+k+", "+k+"<=n)", k, Ln))
ShowAxes(false)
ShowGrid(false)
SetBackgroundColor("AZURE")
CenterView(P1)
StartAnimation(n, true)
Inspired by Steve Phelps
https://x.com/MathTechCoach/status/1750827376148152607?s=20