The chaos game
Pick three corners of a triangle. Start anywhere. Choose a corner at random and jump halfway to it. Mark the spot, then repeat. After a few thousand jumps the dots form the Sierpinski triangle, every time, whatever the starting point.
Why it works
Each "jump halfway" is a rule that shrinks the whole plane toward one corner. There is exactly one shape that equals the union of its three shrunken copies, and the random jumping is drawn onto it. Any set of shrinking rules has such a shape; the Barnsley fern uses four.
Fractal dimension
A line split into halves gives 2 copies at half size; a square gives 4; a cube gives 8. The dimension D is the power that links them: copies = (1 / size)ᴰ. The Sierpinski triangle has 3 copies at half size, so 2ᴰ = 3 and D = log 3 / log 2 ≈ 1.585: more than a line, less than a filled area. With copies of size r, the rule becomes 3·rᴰ = 1. Move the slider and watch both the picture and its dimension change.
When copies overlap
Past a size of one half, the three copies overlap and the formula no longer holds, because overlapping copies count some of the shape twice. The holes shrink as the copies grow, and from two thirds on the triangle is solid, with dimension 2.