MathGroup Archive 1999

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

Search the Archive

trouble with SurfaceColor

  • To: mathgroup at smc.vnet.net
  • Subject: [mg19306] trouble with SurfaceColor
  • From: Tom Burton <tburton at brahea.com>
  • Date: Sat, 14 Aug 1999 23:42:43 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Hello all,

I'm trying to impose a pattern on a surface graphic. Here is an example of
what I am trying to do.

ListPlot3D[
  Table[func[kx,ky], {kx, 0, kMag, kMag/n}, {ky, 0, kMag, kMag/n}], 
  Map[SurfaceColor[GrayLevel[#1], RGBColor[1, 1, 0], 2] & , 
    Table[If[kx^2 + ky^2 < \[Omega]^2/c^2, 0.6, 0.8], 
      {kx, kMag/(2*n), kMag - kMag/(2*n), kMag/n}, 
      {ky, kMag/(2*n), kMag - kMag/(2*n), kMag/n}], 
    {2}], 
  various_options
]

Note that I assign colors directly to polygons, because my color-directory
array is 1 smaller than my function array.

I am presented with a sequence of messages starting so,

SurfaceColor::color: 
   SurfaceColor[GrayLevel[0.6], 
     RGBColor[1, 1, 0], 2]
     is not a valid color or gray-level
     specification.
SurfaceGraphics::color: 
   SurfaceColor[GrayLevel[0.6], 
     RGBColor[1, 1, 0], 2]
     is not a valid color or gray-level
     specification.
...

and then a miscolored surface. I get stuck here, because 

"SurfaceColor[GrayLevel[0.6], RGBColor[1, 1, 0], 2]"

is one of the allowed forms, according to all of my references. I've also tried

"SurfaceColor[RGBColor[0, .4, .5], RGBColor[1, 1, 0], 2]",
"SurfaceColor[RGBColor[0, .4, .5]]", 
"SurfaceColor[GrayLevel[0.8]]", and
"GrayLevel[0.8]"

Only the latter works. So I can set color, but not surface color. But I
want to set surface color, because I want lighting effects.

Has anyone been able to supply an array of SurfaceColor directives to
ListPlot3D?  What's the trick?

Thanks,


Thomas E. Burton              353 Sanford Road
Brahea, Inc.                  Encinitas CA 92024-1508
tburton at brahea.com            760/436-7436


  • Prev by Date: Re: circumference of an ellipse
  • Next by Date: Re: polytopes and cross products
  • Previous by thread: trouble with SurfaceColor
  • Next by thread: RE: trouble with SurfaceColor