More work on the new terrain (WIP)

It's very fiddly at the moment, and creates vertical discontinuities in
the mesh. The principle is interesting, but it's too irregular to be
used at this point.