If you want to see this process build up pixel-by-pixel, please go to Sierpinski Triangle (slow).
To make this image, follow this very simple algorithm...
- Take three vertexes of a triangle.
- Now take any random point inside the triangle. Use it as a starting point.
- Plot this point.
- Now choose any of the 3 vertexes at random and find the midpoint between your current position and this vertex.
- Go to step 3. Repeat.
What happens when you follow the same algorithm but with a square instead of a triangle?