I'm trying to get my head around why the below drawing creates the illusion of 3D. I want to know how this is done.
It's an animation combining two separate images that you'd typically see with a Stereoscopic drawing
In this particular example, it's likely one source image that was modified to create the second image by shifting things around a bit. Things that you want to appear further out in space would shift further than those that you don't.
It also works off the basic graphic design principle of dark colors receding and light colors advancing: http://en.wikipedia.org/wiki/Color_theory
Warm vs. Cool Colors
Color theory has ascribed perceptual and psychological effects to this contrast. Warm colors are said to advance or appear more active in a painting, while cool colors tend to recede; used in interior design or fashion, warm colors are said to arouse or stimulate the viewer, while cool colors calm and relax. Most of these effects, to the extent they are real, can be attributed to the higher saturation and lighter value of warm pigments in contrast to cool pigments. Thus, brown is a dark, unsaturated warm color that few people think of as visually active or psychologically arousing.