i've once coded a plugin for 3dgs which set the vertices of a terrain to a procedurally created heightmap. i've not developped it further but took the code and made a standalone application.