This Demonstration implements the diamond-square algorithm for creating landscapes. You can choose various options to determine the color, smoothness and terrain.
Use the "color" control to set the color sequence and height values at every point to create a unique color gradient.
Use the "divisions" control to subdivide the surface.
The "terrain" control specifies values for range and roughness, both of which are used to define the height value at various points.
The "smoothing" control sets how many points around a given point are used in creating an average height value. This is used to generate a new height function that smooths the resulting graphic.
This implementation uses the ideas presented in [1–5].
 A. Fournier, D. Fussell and L. Carpenter, "Computer Rendering of Stochastic Models," Communications of the ACM
(6), 1982 pp. 371–384. doi:10.1145/358523.358553
 J. P. Lewis, "Generalized Stochastic Subdivision," ACM Transactions on Graphics
(3), 1987 pp. 167–190. doi:10.1145/35068.35069