I have been tinkering with the Pyglet python library. Pyglet is a wrapper for the OpenGL (Open Graphics Library).
Shown below is my attempts at visualizing the result of a terrain generated from the diamod-square algorithm
First attempt. Has some obvious algorithm errors.
Second attempt with a revised algorithm.
You can download the python code here.