There’s a little known algorithm for constructing a Sierpinski triangle that is surprisingly easy to implement.
- Start the three vertices that form a triangle
- Pick a random point inside the triangle
- Pick a random vertex
- Go halfway from a the random point to the vertex and mark that point
- Go to step 3 using the result of 4 as the starting point