
Re: [mg4368] ParametricPlot3D: shading?
Posted:
Jul 19, 1996 2:51 AM


> I am trying to use ParametricPlot3D in the form > > ParametricPlot3D[{fx, fy, fz, s}, ...] > > where s is a colour specification. I expected that the following two > commands would give roughly the same output: > > In[3]:= ParametricPlot3D[{x, y, 1, Hue[x]}, {x, 0, 1}, {y, 0, 1}] > > Out[3]= Graphics3D > > In[4]:= Plot3D[{1, Hue[x]}, {x, 0, 1}, {y, 0, 1}] > > Out[4]= SurfaceGraphics > > But while the second gives a nicely coloured surface, the first does > not. : : > What am I doing wrong? Or is there a bug? > > James Lawry.
Not a bug, per se, but definitely an assumption that throws a lot of users off. By default, ParametricPlot3D uses the lighting model to determine color, and so all color specifications are ignored. In order to expose the color, you need to shut off the lighting.
ParametricPlot3D[{x, y, 1, Hue[x]}, {x, 0, 1}, {y, 0, 1}, Lighting>False]
does the trick.
Sincerely,
John Fultz jfultz@wolfram.com Applications Group Wolfram Research, Inc.

