Sierpinski triangles are fractals - each triangle contains three images of itself. The amazing thing about the Sierpinski triangle is how easily you can generate one: The whole algorithm looks like this:
That's it! You can do that yourself on paper, with ruler and a six sided die to randomly choose a vertex of the triangle (roll of 1,2 means vertex 1, roll of 3,4 means vertex 2, roll of 5,6 means vertex 3).
- choose three points for your bounding triangle
- choose a random starting point, anywhere at all
- choose one of the corners of the bounding triangle, at random
- pull your point halfway toward that point
- go back to step 3
That's it! You can do that yourself on paper, with ruler and a six sided die to randomly choose a vertex of the triangle (roll of 1,2 means vertex 1, roll of 3,4 means vertex 2, roll of 5,6 means vertex 3).