I'm developing a kind of enhanced Matrix class that supports multitexturing, LOD and "playable" randomisation, as in readily-usable terrain shapes. The basis for the class is a 2-dimensional array of Square objects, each created from two instances of DarkGDK.Basic3D.Triangle. My class arranges these squares in a grid, and I'm in the process of writing functions to alter the height of any given point on any given square, as well as the obviously necessary ability to get ground height. What I'm looking for help with is a workable algorithm that procedurally generates a pattern where a variety of hills, valleys, mountains, pits and flat areas are dispersed across the surface of the grid. Ideally, such an algorithm will output a series of floating point values representing Y coordinates for each vertex, which can then be applied to the squares.
-- Coding your worst nightmare --