MathGroup Archive 2005

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

Search the Archive

Re: multiple 3d plots

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56366] Re: multiple 3d plots
  • From: Maxim <ab_def at prontomail.com>
  • Date: Fri, 22 Apr 2005 06:25:49 -0400 (EDT)
  • References: <d47tfi$573$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On Thu, 21 Apr 2005 09:58:10 +0000 (UTC), juejung <juejung at indiana.edu>  
wrote:

> okay, this seems to do the trick.
> but the show command doesn't use the color i specified for graph p2. any,
> idea?
>
>
> p1 = Plot3D[x^2*y, {x, 1, 2}, {y, 1, 2}];
> p2 = Plot3D[{3*x*(1/y),Hue[.4]}, {x, 1, 2}, {y, 1, 2}];
> Show[p1, p2];
>

Show[
   Graphics3D@ p1,
   Graphics3D@ p2 /. h_Hue -> SurfaceColor[h],
   Lighting -> True]

or

Show[
   Graphics3D@ p1 /. p_Polygon -> {Hue[2/3], p},
   Graphics3D@ p2,
   Lighting -> False]

Either way one of the plots has to be modified, because originally p1 uses  
the simulated lighting and p2 doesn't. Another method is to use  
ParametricPlot3D, which accepts a list of plot objects.

I think some of the details on using graphics (graphic details?) are not  
very well documented; for example, ColorFunction help page says: "In  
three-dimensional graphics, ColorFunction is used only with the option  
setting Lighting -> False." However,

Plot3D[{x^2 + y^2, Hue[0]}, {x, -1, 1}, {y, -1, 1},
   ColorFunction -> (Hue[2/3]&), Lighting -> True]

plots using Hue[2/3], not Hue[0].

Maxim Rytin
m.r at inbox.ru


  • Prev by Date: findroot problem
  • Next by Date: Re: a conflicting StringReplace
  • Previous by thread: Re: multiple 3d plots
  • Next by thread: Re: Re: multiple 3d plots