Click the flag or space to generate some random terrain, that's all it does
Everything except the cosine interpolation by me, I used this as a reference for the cosine interpolation: http://paulbourke.net/miscellaneous/interpolation/