http://graphics.stanford.edu/~seande...ReverseObvious

Starts with the "obvious" way to do it, then follows up with some more efficient ways to achieve the same goal.