How it work.

Every X frames, take the current image copy it to two other temporary graphic (for the left and right side).
Then draw pick a random point and angle.
On the left image erase everything right of that line. Do the opposite for the right image.
Pick a new color.
Everyframe, erase everything on the current frame, draw the back on with the new color then draw the left and right image on top, offseting their position by the cross product of the angle of the line.
#creativecode #creativecodeart #procgen #procedural #processing #p5js #p5 #creat