Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

Re: RE: Avoid meshing

  • To: mathgroup at smc.vnet.net
  • Subject: [mg18143] Re: [mg18119] RE: [mg17352] Avoid meshing
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Fri, 18 Jun 1999 00:51:44 -0400
  • Organization: Wolfram Research, Inc.
  • References: <199906171626.MAA20141@smc.vnet.net.>
  • Sender: owner-wri-mathgroup at wolfram.com

Actually, Mesh is quite versatile if you use the MeshStyle
option.  To accomplish your tasks of:

Making a gray mesh with Plot3D:
	Plot3D[Sin[x y],{x,0,3},{y,0,3},
		MeshStyle->{GrayLevel[0.6]}];

Making a gray mesh with DensityPlot:
	DensityPlot[f,{x,xmin,xmax},{y,ymin,ymax},
		MeshStyle->{GrayLevel[0.6]}];

John Fultz
Front End Group
Wolfram Research, Inc.

Ersek, Ted R wrote:
> 
:
:
> 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[4]:=
>  ParametricPlot3D[{r*Cos[phi],r*Sin[phi],0,
>     {EdgeForm[GrayLevel[r]],RGBColor[1,0,0]}},
>     {phi,0,Pi/2},{r,0,1},Lighting->False
>    ];
> 
> --------------
> In the next line two graphic directives are used inside EdgeForm.  In this
> case
>   EdgeForm[{d1,d2}] must be used.
> 
> 
> In[5]:=
>  ParametricPlot3D[{r*Cos[phi],r*Sin[phi],0,
> 
> {EdgeForm[{GrayLevel[r-2],AbsoluteThickness[3]}],RGBColor[(4-r)/2,0,0]}},
>     {phi,0,Pi/8},{r,2,3},Lighting->False,PlotPoints->6
>    ];
> 
> --------------------
> 
> The usage message for EdgeForm suggests it can be used with Graphics3D
> expressions.  This can be demonstrated with one of the standard packages.
> 
> In[6]:=
> <<Graphics`Shapes`
> 
> The next two lines respectively make a torus with no edges and then with
> gray edges.
> 
> In[7]:=
>   Show[Graphics3D[{EdgeForm[], Torus[ ] }]];
> 
> 
> In[8]:=
>   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.
> 
> In[9]:=
> Block[{$DisplayFunction=Identity},
>  gr=Plot3D[Sin[x y],{x,0,3},{y,0,3}]];
> Show[Graphics3D[{EdgeForm[GrayLevel[0.6]],Part[Graphics3D[gr],1]}],
>  Axes->True,BoxRatios->{1,1,0.4}];
> 
> --------------------
> 
> 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
>  Block[{$DisplayFunction=Identity},
>  densty=DensityPlot[f,{x,xmin,xmax},{y,ymin,ymax},Mesh->False]]
> 
> 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]
> 
> ---------------------
> 
> Regards,
> Ted Ersek


  • Prev by Date: Re: Dealing with submatrices
  • Next by Date: Re: Mathematica Link for Excel
  • Previous by thread: RE: Avoid meshing
  • Next by thread: Reading in equations for evaluation