Lithosphere is a GPU driven terrain generator. It allows you to create and export material textures and heightmaps intended for use in realtime graphics applications.
All terrain algorithms are implemented as GLSL fragment shaders operating on floating point textures. This allows realtime modification of the terrain. A graph of nodes is evaluated in order to arrive at the terrain output.
License: AGPL
Requirement: 32bit python2.6 (:|), a modern graphics card
Tested on: Windows, Linux
The creator's blog might be of interest to you as well. The last few articles cover OpenGL and HTML5/JavaScript Canvas.