MathGroup Archive 1995

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

Search the Archive

ParametricPlot3D, color with function ?

  • To: mathgroup at
  • Subject: [mg2787] ParametricPlot3D, color with function ?
  • From: crobc at (Christopher R. Carlen)
  • Date: Sun, 17 Dec 1995 02:06:43 -0500
  • Organization:

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]

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
carlenC at

  • Prev by Date: Re: Oh why is life never easy? Need help with |vector|
  • Next by Date: Re: Oh why is life never easy? Need help with |vector|
  • Previous by thread: ParametricPlot3D, color with function ?
  • Next by thread: Infinity