Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

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

Search the Archive

Re: ParametricPlot3D: shading?

  • To: mathgroup at
  • Subject: [mg4465] Re: [mg4368] ParametricPlot3D: shading?
  • From: Allan Hayes <hay at>
  • Date: Mon, 29 Jul 1996 02:37:20 -0400
  • Sender: owner-wri-mathgroup at

lawry at (James Lawry)
[mg4368] ParametricPlot3D: shading?

Is concerned that
	ParametricPlot3D[{x, y, 1, Hue[x]}, {x, 0, 1}, {y, 0, 1}]
colors according to the lighting, while
	Plot3D[{1, Hue[x]}, {x, 0, 1}, {y, 0, 1}]
colors according to the directive Hue[x].


Firstly, we can color ParametricPlot3D[..] according to directive  
by turning the lighting off.
	ParametricPlot3D[{x, y, 1, Hue[x]}, {x, 0, 1}, {y, 0, 1},
		Lighting -> False

The reason that we don't need to do this for  Plot3D[...] and why  
it is hidden seems to lie in the following.

Although we have
sg = Plot3D[{1, Hue[x]}, {x, 0, 1}, {y, 0, 1}]
colored according to the directive Hue[x],
with, surprisingly
Options[sg, Lighting]
	{Lighting -> True}

The SurfacGraphics object stores only matrices of heights color  
directives, NOT the polygons that appear in the display.Check with

Presumably the polygons must be constructed to be displayed.
Let's simulate this by converting sg to a Graphics3D object	

sg3d = Graphics3D[sg]
Check that the polygons are there:

AND note that the option Lighting -> False has been automatically  
prepended to the list of options. We can see this without searching  
all of the code:

Options[sg3d,  Lighting]
	{Lighting -> False, Lighting -> True}

(1) We can see the graphics code by using InputForm instead of the  
List@@  trick (which I used to emphasise that no processing was  


(2) It makes the preceding more manageable if we reduce the number  
of plot points, by using PlotPoints -> 3 for example.

(3) Try
Show[sg3d, Lighting -> True]

Allan Hayes
hay at


  • Prev by Date: Matrices
  • Next by Date: Re: Pairings
  • Previous by thread: Re: ParametricPlot3D: shading?
  • Next by thread: Two Dimensional Numerical Integration Packages