MathGroup Archive 1998

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

Search the Archive

Re: About plotting a surface


  • To: mathgroup@smc.vnet.net
  • Subject: [mg12570] Re: About plotting a surface
  • From: "P.J. Hinton" <paulh@wolfram.com>
  • Date: Mon, 25 May 1998 14:24:43 -0400
  • Organization: Wolfram Research, Inc.
  • References: <6k7d5r$1cc@smc.vnet.net>

On 23 May 1998, Arhur Luiz Amaral da Cunha wrote:

> I would like to know how to take the mesh off a parametric surface using
> the command ParametricPlot3D. I tried to use the  "Mesh->False" option
> but it did not work within ParametricPlot3D despite  it did work within
> Plot3D. I would appriciate it wether you could give me an advice. I
> look forward to your reply.

The graphics generated by Plot3D[] are represented by Mathematica as
SurfaceGraphics objects, for which Mesh is a valid option.  Surfaces
generated by ParametricPlot3D[] are represented internally with more
general Graphics3D objects, which do not support a Mesh option.  The
elimination of lines can be achieved through the EdgeForm[] directive,
which is used to modify the Polygon[] primitives in the Graphics3D
object.

Here is an example using a ParametricPlot3D[]-generated sphere

<<Graphics`ParametricPlot3D`

gr = (ParametricPlot3D[
  {Cos[u] Cos[v], Sin[u] Cos[v], Sin[v]},
    {u, 0, 2Pi, Pi/20},
    {v, -Pi/2, Pi/2, Pi/10}, DisplayFunction -> Identity] /. 
      Polygon[x_] -> {EdgeForm[], Polygon[x]} )

Show[gr, DisplayFunction -> $DisplayFunction]

The operation above uses ReplaceAll[] (/.) to place all Polygon[]
primitives inside of lists which contain a null argument EdgeForm[]
directive.

See Section 2.9.9 of _the Mathematica Book_ for details.

You can also paste the following ButtonBox[] in a Mathematica notebook
to create a hyperlink that will point you to the relevant section.

\!\(\*
  TagBox[
    ButtonBox[\(Using\ the\ EdgeForm\ directive\),
      ButtonData:>{"2.9.9", "9.14"},
      ButtonStyle->"MainBookLink"],
    DisplayForm]\)
 
--
P.J. Hinton
Mathematica Programming Group           paulh@wolfram.com Wolfram
Research, Inc.                  http://www.wolfram.com/~paulh/
Disclaimer: Opinions expressed herein are those of the author alone.




  • Prev by Date: Re: What to return on symbolic evaluation of own heads ?
  • Next by Date: Re: What to return on symbolic evaluation of own heads ?
  • Prev by thread: Re: About plotting a surface
  • Next by thread: Re: About plotting a surface