MathGroup Archive 2006

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

Search the Archive

RE: SpericalPlot3D in Gray?

  • To: mathgroup at
  • Subject: [mg72120] RE: [mg72073] SpericalPlot3D in Gray?
  • From: "David Park" <djmp at>
  • Date: Wed, 13 Dec 2006 06:38:54 -0500 (EST)


You could do it the following way...

SphericalPlot3D[ {(theta/2 - Pi/2)^2, {SurfaceColor[GrayLevel[0.7]],
        EdgeForm[GrayLevel[0.5]]}}, {theta, 0, Pi}, {phi, 0, 2Pi},
    PlotPoints -> {54, 34},
    LightSources -> {{{1.`, 0.`, 1.`}, GrayLevel[0.5]}, {{1.`, 1.`, 1.`},
          GrayLevel[0.5]}, {{0.`, 1.`, 1.`}, GrayLevel[0.5]}},
    Axes -> False,
    BoxStyle -> Gray,
    ImageSize -> 350];

Instead of a simple radial function you use a list where the first item is
the radial function and the second item is color directives for the surface.
The color directives could be functions of phi and theta. But to show the
surface color properly you have to use neutral colors for the light sources.

Another way to do this is with the DrawGraphics package from my web site
below. Here, if the surface color is uniform, it can be placed before the
SphericalDraw3D statement. NeutralLighting[saturation, brightness, ambient]
is an easier DrawGraphics command that allows you to control the light
sources. (It also allows the lights to be rotated about the z axis.) In both
of the plots I also used EdgeForm so that the 'mesh' lines were only a
slightly darker shade of the surface color. Subdued edges generally look
better than black edges.


    {SurfaceColor[GrayLevel[0.7]], EdgeForm[GrayLevel[0.5]],
      SphericalDraw3D[ (theta/2 - Pi/2)^2, {theta, 0, Pi}, {phi, 0, 2Pi},
        PlotPoints -> {54, 34}]},
    NeutralLighting[0.0, 0.5, 0.1],
    BoxStyle -> Gray,
    ImageSize -> 300];

David Park
djmp at

From: Thomas Rausch [mailto:thomas.rausch at]


is there a Possibility to show figures with SpericalPlot3D in


  • Prev by Date: Re: Function of several variables
  • Next by Date: Re: K-nearest neighbhors on an equispaced multidimensional grid
  • Previous by thread: Re: SpericalPlot3D in Gray?
  • Next by thread: basic complex number question