Re: How to plot a mesh.

Hi Vladimir,

> I have been trying to plot a 3D surface like a mesh.
> (you know, like the surface generated by the matlab command... "mesh"!)
> is it possible to do it by choosing the "right" DisplayRealType (I still
> haven't found it)
> or is it more difficult?

If you can live with having diagonal lines in each mesh box, its
pretty easy.  If you run 'java Test12' in visad/examples, you'll
see a 2-D surface.  If you modify to add a line:

    GraphicsModeControl mode = dpys[0].getGraphicsModeControl();
    mode.setPolygonMode(DisplayImplJ3D.POLYGON_LINE); // ADD THIS LINE

Then compile (javac -g, then run 'java Test12' you'll
see the surface as a mesh.

If you want more control over the mesh appearence, copy the ideas
in the main() method of visad/, lines 1013 - 1125.

Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738

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