sier chaos
source

A rendition of The Chaos Game, one of the most fun and intriguing ways of making a Sierpinski triangle. We start with a random dot (constrained to a disc inscribed) in a triangle. Then we choose any of the 3 corners, move halfway between that point and the corner, leave a mark, and repeat.

This version changes the framerate to be slower the lower on the canvas the mouse is, plus we break the movement into 2 parts so you can get a better idea of the corner selection.

You can also play with this in the p5 online editor