RE: trouble with SurfaceColor
- To: mathgroup at smc.vnet.net
- Subject: [mg19374] RE: [mg19306] trouble with SurfaceColor
- From: "Ersek, Ted R" <ErsekTR at navair.navy.mil>
- Date: Sat, 21 Aug 1999 00:04:43 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Tom Burton wrote:
------------------------
<snip>
Has anyone been able to supply an array of SurfaceColor directives to
ListPlot3D? What's the trick?
-------------------------
Try the following:
In[1]:=
data=Table[Sin[x y]+Random[Real,{-0.15,0.15}],
{x,0.5,2.5,0.2},{y,0.5,2.5,0.2}];
In[2]:=
gr1=ListPlot3D[data];
(* Graphics not shown. *)
In[3]:=
gr2=First[Graphics3D[gr1]];
Show[Graphics3D[{SurfaceColor[RGBColor[0,0.3,0.6],RGBColor[0,0.7,0.3],2],gr2
}],
BoxRatios->{1,1,0.4}];
(* Graphic not shown. *)
----------------------
In the above (gr1) has the Head SurfaceGraphics. I found when using
Show[Graphics3D[{SurfaceColor[_,_,_],gr2}]]
I must use (gr2) which is a list of Polygons.
Using gr2=First[Graphics3D[gr1]] I get a list of Polygons as required.
Let me know if you still can't solve your problem.
---------------------
Regards,
Ted Ersek
For Mathematica Tips, Tricks see
http://www.dot.net.au/~elisha/ersek/Tricks.html