Perlin Noise.
Justin wrote this, I haven't actually looked at it yet...
ANSI C