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 Test12.java to add a line:

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

Then compile (javac -g Test12.java), 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/Delaunay.java, lines 1013 - 1125.

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


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