title: How to make topographic map from sparse sampling data?
body: <p>I need to make a topographic map of a terrain for which I have only fairly sparse samples of <em>(x,&nbsp;y,&nbsp;altitude)</em> data.  Obviously I can't make a completely accurate map, but I would like one that is in some sense "smooth".  I need to quantify "smoothness" (probably the reciprocal the average of the square of the surface curvature) and I want to minimize an objective function that is the sum of two quantities:</p>
  
  <ul>
  <li>The roughness of the surface</li>
  <li>The mean square distance between the altitude of the surface at the sample point and the actual measured altitude at that point</li>
  </ul>
  
  <p>Since what I actually want is a topographic map, I am really looking for a way to construct contour lines of constant altitude, and there may be some clever geometric way to do that without ever having to talk about surfaces.  Of course I want contour lines also to be smooth.</p>
  
  <p>Any and all suggestions welcome.  I'm hoping this is a well-known numerical problem.  I am quite comfortable in C and have a working knowledge of FORTRAN.  About Matlab and R I'm fairly clueless.</p>
  
  <hr>
  
  <p>Regarding where our samples are located: we're planning on roughly even spacing, but we'll take more samples where the topography is more interesting.  So for example we'll sample mountainous regions more densely than a plain.  But we definitely have some choices about sampling, and could take even samples if that simplifies matters.  The only issues are</p>
  
  <ul>
  <li><p>We don't know how much terrain we'll need to map in order to find features that we are looking for.</p></li>
  <li><p>Taking a sample is moderately expensive, on the order of 10 minutes.  So sampling a 100x100 grid could take a long time.</p></li>
  </ul>