MathGroup Archive 2001

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

Search the Archive

RE: convert graphics

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30630] RE: [mg30602] convert graphics
  • From: "David Park" <djmp at earthlink.net>
  • Date: Fri, 31 Aug 2001 19:58:06 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Borut,

What you want is the Graphics3D directive EdgeForm. EdgeForm[] suppresses
the drawing of the polygon edge lines in an object. The problem is how to
sneak that directive into the plotting statement. I will do some examples
with a parametrization of a sphere.

If you look up ParametricPlot3D in Help, you will see that there is a third
form where "color specifications" can be added as a fourth item in the
parametrization. This is misleading. You can, in fact, put any Graphics3D
directives there, or a list of them. WRI should really change that
particular Help message. So, the following will plot the sphere without the
polygon edges.

ParametricPlot3D[{Cos[t]Cos[s], Sin[t]Cos[s], Sin[s], EdgeForm[]},
{s, -Pi/2,
      Pi/2}, {t, 0, 2 Pi}];

Still, this is to my mind a somewhat awkward method of doing it, and is a
result of Mathematica's inside out graphics paradigm. Suppose that you have
already written a parametrization for your surface.

sphere[s_, t_] := {Cos[t]Cos[s], Sin[t]Cos[s], Sin[s]};

Then, to sneak in the plotting directives you have to write a second
parametrization:

sphere2[s_, t_] := Join[sphere[s, t], {EdgeForm[]}]

ParametricPlot3D[Evaluate[sphere2[s, t]], {s, -Pi/2, Pi/2}, {t, 0, 2 Pi}];

The natural way would be to specify graphics directives first and then plot
the items that use the directives. This can be done with the Show statement,
but is also awkward.

Show[Graphics3D[{EdgeForm[],
        First[ParametricPlot3D[
            Evaluate[sphere[s, t]], {s, -Pi/2, Pi/2}, {t, 0, 2 Pi},
            DisplayFunction -> Identity]]}]];

My DrawingCube package provides a more direct method for doing this.

Needs["Graphics`DrawingCube`"]
Needs["Graphics`ParametricDrawing3D`"]

Show[Graphics3D[
	{EdgeForm[],
        ParametricDraw3D[
          Evaluate[sphere[s, t]], {s, -Pi/2, Pi/2}, {t, 0, 2 Pi}]}]];

Finally, there is a very nice package done by Allan Hayes and Hartmuth Wolf
called Smooth3D. Allan posted it on MathGroup a few months ago. It allows a
surface to be plotted with a fine "mesh" so that it will be smooth, but with
much more widely spaced coordinate lines, so that they don't dominate the
surface. Quite often that is the reason people want to eliminate the edges.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/


> From: Borut L [mailto:borut at email.si]
To: mathgroup at smc.vnet.net
>
> Hi,
>
>
> I have a ParametricPlot3D object (Graphic3D object), which I would like to
> have no mesh-lines. The option for Sufrace Graphics (Mesh ->
> False) is what
> I would like. But I can't convert the first to the later. Is
> there a way to
> convert it or is there alternative to disable mesh in Graphics3D object?
>
>
> Thank you,
>
> Borut Levart
>
>
>



  • Prev by Date: Re: confusing Mathematica?
  • Previous by thread: Re: convert graphics
  • Next by thread: Commands to restore Kernel