MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Avoid meshing

  • To: mathgroup at
  • Subject: [mg18119] RE: [mg17352] Avoid meshing
  • From: "Ersek, Ted R" <ErsekTR at>
  • Date: Thu, 17 Jun 1999 12:26:47 -0400
  • Delivery-date: Thu Jun 17 14:49:57 1999
  • Sender: owner-wri-mathgroup at

Alexander Kricke wrote:
How can I prevent that Mathematica 3.0 generates a mesh for following


Mesh->False does not work.

The code in the next line will do what you want.



Your question made me discover a big can of worms.  To see what I mean read
on.  First read the usage message for Mesh.

In[2]:= ?Mesh

Mesh is an option for SurfaceGraphics and DensityGraphics that specifies
whether an explicit   x-y mesh should be drawn.

The usage message doesn't say so but Mesh is also an option for DensityPlot,
ListDensityPlot, ListPlot3D, and Plot3D.  I suppose these functions use the
Mesh option because they make DensityGraphics or SurfaceGraphics.

No other functions recognize the Mesh option.


When you use 
  ParametricPlot3D[{fx, fy, fz, s}, {x,xmin,xmax},{y,ymin,ymax}]

(s) can be a single graphics directive or a list of graphics directives. Now
consider the EdgeForm directive below.

In[3]:= ?EdgeForm
EdgeForm[g] is a three-dimensional graphics directive which specifies that
edges of polygons are to be drawn using the graphics directive or list of
graphics directives g.

 EdgeForm[] indicates no edges should be drawn.

In the usage message above "three-dimensional graphics directive" reefers to
directives used with Graphics3D.  Plot3D makes SurfaceGraphics (not
Graphics3D) so EdgeForm can't be used inside Plot3D.  Of course Plot3D has
the Mesh option and that takes care of our needs in many cases.

Notice EdgeForm is much more versatile than the Mesh option. Consider the
next line where the shade of the polygon edges is a function of (r).


In the next line two graphic directives are used inside EdgeForm.  In this
  EdgeForm[{d1,d2}] must be used.



The usage message for EdgeForm suggests it can be used with Graphics3D
expressions.  This can be demonstrated with one of the standard packages. 


The next two lines respectively make a torus with no edges and then with
gray edges.

  Show[Graphics3D[{EdgeForm[], Torus[ ] }]];
  Show[Graphics3D[{EdgeForm[GrayLevel[0.6]], Torus[ ] }]];


I found it's a little difficult to get a gray mesh using Plot3D.
I was able to do it with the code below.

 gr=Plot3D[Sin[x y],{x,0,3},{y,0,3}]];


Now how do you make a DensityPlot with a gray mesh?
That's also tricky.  I haven't bothered to work it out, but you could use

Then use the parts of (densty) to make a gray mesh made of 2D primitives and
directives, and display the two using 
 Show[densty, GrayMesh]


Ted Ersek

  • Prev by Date: Options for a function
  • Next by Date: Reading in equations for evaluation
  • Previous by thread: Re: Options for a function
  • Next by thread: Re: RE: Avoid meshing