perlinNoise() is the function to look at. I implemented it based on http://web.archive.org/web/20070706003038/http://www.cs.cmu.... but the images are missing in the web archive :(