MathGroup Archive 2005

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

Search the Archive

Re: Plot3D gives serrated ridge

  • To: mathgroup at
  • Subject: [mg54795] Re: [mg54778] Plot3D gives serrated ridge
  • From: "Wolf, Hartmut" <Hartmut.Wolf at>
  • Date: Wed, 2 Mar 2005 01:26:41 -0500 (EST)
  • Sender: owner-wri-mathgroup at

>-----Original Message-----
>From: Hugh Goyder [mailto:h.g.d.goyder at] 
To: mathgroup at
>Sent: Tuesday, March 01, 2005 7:59 AM
>Subject: [mg54795] [mg54778] Plot3D gives serrated ridge
>The function f, below, has two sharp ridges. The interaction 
>between the
>mesh positions and the ridges gives the impression of a very 
>jagged rather
>than a smooth ridge. Consequently the plot is difficult to interpret.
>Unfortunately the plot has to be in black and white for publication.
>Any suggestions for improving the plot?
>Is it possible to plot contours and lines of steepest decent in three
>f = -((2*I)/(4 - 100*((9.42477796076938 + 0.01*I) -
>2*k)*(0.047123889803846894*I - k + k1)));
>Plot3D[Evaluate[Abs[f]], {k1, 4, 5.5}, {k, 4.5, 5}, PlotPoints 
>-> {50, 50},
>ColorFunction -> (RGBColor[1, 1, 1] & )];
>Hugh Goyder


this is a case for Smooth3D, a package that resulted from a discussion
between Allan Hayes and myself. You'll find it in this post:


<< Smooth3D`

(g = Smooth3D[Plot3D[Abs[f],{k1,4,5.5},{k,4.5,5}, PlotRange -> All,
      PlotPoints -> 30, ImageSize -> 800], Smoothing -> 10])//Timing

you'll get a pretty -- though not perfect -- graphics, you might try to
increase Smoothing further if you have enough core memory (or a large
page file, and hours of time).

Part of your problem was the missing option PlotRange -> All, that cut
off the tip of the ridges.

The serrations are a result of the Mathematica treatment of the
3D-tiles, which are based on the illusion as being flat -- which
obviously becomes bad at regions of strong curvature, as on your ridges.
Clearly, reducing the size of the tiles, adding more PlotPoints that is,
mitigates the bad effect; but then your graphics get cluttered with
lines.  Decimating these is just what Smooth3D does.

This of course is a brute force method, that wastes the computational
resources.  There are better ideas, of course, but I haven't found the
time yet to realize them. (Perhaps the best idea of all would be to
rewrite Mathematica's graphics subsystem.)

As for the black and white, this can be (or should be) left to the
Postscript drivers or printers. The only point is that this is not under
your own control. For own tries you might begin with:

  LightSources -> {{{0, 1, .3}, GrayLevel[1]}, {{0, 0, 1},

Finally mark the graphics and export with Edit > Save Selection as... >

Hartmut Wolf

  • Prev by Date: Re: Putting the same function name in multiple modules.
  • Next by Date: Re: Mathematical Experiments
  • Previous by thread: Re: Plot3D gives serrated ridge
  • Next by thread: Re: Plot3D gives serrated ridge