Sierpinski Triangle (Chaos Game)

To Learn about Sierpinski Trangles

and the Chaos Game, I recommend

the following youtube video

Chaos Game - Numberphile

The canvas is 500px by 500px

with (0,0) in the upper left

corner, and (500,500) in the

lower right corner.

How it works

► Pick 3 random points on a plane

► Pick 1 random starting point

► Randomly pick 1 of the 3 points

► draw a new starting point half way between the two points

► Repeat

Created by Tony Cicero