I\'ve been working on a visualization project for 2-dimensional continuous data. It\'s the kind of thing you could use to study elevation data or temperature patterns on a 2
Alternately, there is the marching squares algorithm which seems appropriate to your problem, although you may want to smooth the results if you use a coarse grid.
The topo curves you want to draw are isosurfaces of a scalar field over 2 dimensions. For isosurfaces in 3 dimensions, there is the marching cubes algorithm.