Re: Irregular2DSet and contour lines

Hi Gaoming,

> 1. I used Irregular2DSet to draw the following data.
> 
> 4.0f 3.2f 9.0f
> 5.4f 4.0f 9.0f
> 4.0f 5.3f 9.0f
> 3.2f 4.0f 9.0f
> 4.0f 2.0f 8.0f
> 6.0f 3.0f 8.0f
> 6.0f 4.0f 8.0f
> 5.0f 5.0f 8.0f
> 4.0f 6.0f 8.0f
> 3.0f 6.0f 8.0f
> 2.0f 5.0f 8.0f
> 2.0f 4.0f 8.0f
> 2.0f 4.0f 4.0f
> 4.0f 2.0f 4.0f
> 6.0f 3.0f 4.0f
> 6.0f 4.0f 4.0f
> 5.0f 5.0f 4.0f
> 4.0f 6.0f 4.0f
> 3.0f 6.0f 4.0f
> 2.0f 5.0f 4.0f
> 
> I can not see any points with z values of 4.0, i.e., there is no surface 
> drawn between
> points with z value of 4.0 and points with z values of 8.0 and 9.0. But all 
> the points can
> be seen in the point mode. Please note that points with z values of 4.0 have 
> the same
> x and y values as points with z values of 8.0.

If you are constructing an Irregular2DSet, then you must be
representing your data as a FlatField with a 2-D domain and
MathType ((x, y) -> z). But if you have different z values
(4.0 and 8.0) at the same (x, y) locations, then z is not a
function of (x, y). If you are passing all your (x, y) locations
to the Irregular2DSet constructor, some of them will be
identical, which will cause trouble in the implicit call to
the Delaunay constructor.

Because z is not a function of (x, y) you probably shouldn't
try to depict your data as a functional surface. You might
partition your data, so that the points in each partition
do define a function relation ((x, y) -> z), then depict
your data as multiple surfaces, one for each partition.

> 2. I want to draw 3D surface together with contour lines and the contour line 
> should be
> labeled with elevation.

You can construct ScalarMaps of z to ZAxis and to IsoContour.
However, 2-D contour labeling currently only works for
GriddedSets, so you will need to resample to a grid to get
labels. A high resolution grid will be the most faithful
to your original data.

> 3. Can I add my own TransformGroup (i.e., built from java3d,without
> using any VisAD) to DisplayImplJ3D in a class built using VisAD, and then 
> draw it together with any other data processed using VisAD, in the
> same Coordinate system?

Yes. Try:

  DisplayRendererJ3D dr = display.getDisplayRenderer();
  TransformGroup tg = dr.getTrans();

Now you can add your own TransformGroup under tg. Note
that the Transform3D in tg is controlled by the VisAD
ProjectionControl and mouse rotate, translate and zoom.
If you want to add your TransformGroup above this, then
add them to the BranchGroup:

  BranchGroup bg = dr.getRoot();

Good luck,
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


  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: