Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

Re: Plot3D gives serrated ridge

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

>-----Original Message-----
>From: Hugh Goyder [mailto:h.g.d.goyder at cranfield.ac.uk] 
To: mathgroup at smc.vnet.net
>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
>dimensions?
>
>
>
>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] & )];
>
>
>
>Thanks
>
>Hugh Goyder
>
>
>
>

Hugh,

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:
http://forums.wolfram.com/mathgroup/archive/2001/May/msg00291.html

With 

<< 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:

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


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


--
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