ParametricPlot3D, color with function ?
- Subject: [mg2787] ParametricPlot3D, color with function ?
- From: crobc at epix.net (Christopher R. Carlen)
- Date: Sun, 17 Dec 1995 02:06:43 -0500
- Approved: usenet@wri.com
- Distribution: local
- Newsgroups: wri.mathgroup
- Organization: epix.net
I am finding minima of the function M(x,y,z)=6x-y^2+xz+60 over the
constraint x^2+y^2+z^2=36 . I plotted the top half of the sphere as
z=Sqrt[36-x^2-y^2] over {x,-6,6}, {y,-6,6} however this clips the surface
with a jagged edge wherever (x,y) is not in the domain of z(x,y) .
But nonetheless, with this plot I added:
Hue[(6x-y^2+x Sqrt[36-x^2-y^2])/100] which allowed me to visualize the
value of the function M over the constraining sphere.
Question: Can one color a surface in ParametricPlot3D with a function of
(x,y,z) or (t,u) , so that that function, such as M above, may be visualized
as a color change over the constraint domain which is the surface.
I want to use ParametricPlot3D because it allows me to show the entire
sphere, which I currently parameterized as:
x(t,u)=Sqrt[36-u^2] Cos[t]
y(t,u)=Sqrt[36-u^2] Sin[t]
z(t,u)=u
t=[0,2Pi]
I can write M in terms of t and u using the parametrics, but is there a
coloring function like Hue[] to which to feed the resulting value ?
Is there any other way to do this sort of thing, perhaps through
ContourPlot3D or other functions ?
_____________________
Christopher R. Carlen
crobc at epix.net
carlenC at cs.moravian.edu