Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Varying colors in Plot3D according to Height

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55569] Re: Varying colors in Plot3D according to Height
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 30 Mar 2005 03:21:01 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <d1on4g$ncb$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

I'm not sure if this is "aesthetically pleasing" 
but something like
gr = Graphics3D[Plot3D[
Sin[x*y], {x, -Pi, Pi}, {y, -Pi, Pi}, 
PlotPoints -> 64,
Mesh -> False]];

Show[
gr /. Polygon[pnts_] :> (zz = Max[Last /@ pnts];
{SurfaceColor[If[zz > 0, RGBColor[zz, 1 - zz, 0], 
RGBColor[1, 1, 1]]],
Polygon[pnts]})
]

may help you.



Regards

  Jens

"Mark Coleman" <mark at markscoleman.com> schrieb im 
Newsbeitrag news:d1on4g$ncb$1 at smc.vnet.net...
>I am plotting a three-dimension function using 
>Plot3D. I would like to
> highlight the portion of the surface whose 
> height exceeds 1.0 a
> different color or hue than the portion of the 
> surface below 1.0. My
> attempts at using ColorFunction to do this have 
> been less than
> aesthetically pleasing, to say the least. 
> Ideally, I'd like the portion
> below 1.0 to retain the default Mathematica blue 
> shading (I'm using
> Mathematica ver 5.1.1 on a Mac OS X 10.3.8), and 
> perhaps have the portion
> above 1.0 to have a red shading. Any help would 
> be greatly appreciated.
>
> Thanks,
>
> -Mark
> 



  • Prev by Date: Re: how to make conditional summation
  • Next by Date: Re : intersection point from listplots
  • Previous by thread: Re : Position function
  • Next by thread: Re : intersection point from listplots