Re: Elevation surfaces -- Cutting planes

Hi Mohamad and Ugo,

> The idea is to be able to depict a movable plane that sweeps the
> DEM and sends the data of the intersection curve to the 2D display.

If the DEM is "FlatField elevation" with MathType ((x, y) -> z) then
to make a vertical cutting plane, construct "Gridded2DSet cutting_set"
with MathType Set(x, y) and manifold dimension = 1, whose samples
lie along the line in the (x, y) plane that is the intersection of
the (x, y) plane with the vertical cutting plane.  Then:

  FlatField cut_elevation = (FlatField)
    elevation.resample(cutting_set, Data.WEIGHTED_AVERAGE, Data.NO_ERRORS);

and cut_elevation will be displayed in your 3-D DEM display as the
curve that is the intersection of your DEM with the vertical cutting
plane.  For your 2-D display, construct another RealType w that
represents location along the line in the (x, y) plane and construct
"Gridded1DSet dem2d_samples" with MathType Set(w) and whose samples are
the w locations of the samples of cutting_set.  Then:

  FunctionType dem2d_type = new FunctionType(w, z);
  FlatField dem_2d = newFlatField(dem2d_type, dem2d_samples);
  double[][] values = cut_elevation.getValues();
  dem_2d.setSamples(values);

Now you can display dem_2d in 2-D with the ScalarMaps:

  ScalarMap(w, Display.XAxis);
  ScalarMap(z, Display.YAxis);

If your DEM display includes 3-D FlatFields [i.e., MathType
((x, y, z) -> attribute)] representing sub-surface data, then you can do
something similar by defining a "Gridded3DSet cutting_plane" with MathType
Set(x, y, z) and manifold dimension = 2, whose samples are a 2-D grid lying
on the cutting plane.  Then resample the 3-D FlatFields to cutting_plane,
etc.

Cheers,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html