The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Re: [mg4368] ParametricPlot3D: shading?
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Allan Hayes

Posts: 1,508
Registered: 12/6/04
Re: [mg4368] ParametricPlot3D: shading?
Posted: Jul 19, 1996 2:59 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply (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

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.