Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

Re: ColorFunction TriangularSurfacePlot

  • To: mathgroup at
  • Subject: [mg35406] Re: ColorFunction TriangularSurfacePlot
  • From: "ng" <georgakopoulos at>
  • Date: Thu, 11 Jul 2002 05:24:13 -0400 (EDT)
  • References: <aggkjf$ik$>
  • Sender: owner-wri-mathgroup at

Try this. The Table[] creates ten triangles at random heights z (and the
postfix [[{4,5}]] discards the x,y, and z values) that are drawn using
Polygon[]. Each triangle is preceded by a specification of graylevel.
Then Show[Graphics3D[ ]]  shows them all in a 1x1x1 box.

coords = Table[{x = Random[], y = Random[], z = Random[], GrayLevel[z],
        Polygon[{{x, y, z}, {x + .2, y, z}, {x + .1, y + .2, z}}]}[[{4,
        5}]], {i, 1, 10}];
Show[Graphics3D[coords], Lighting -> False,
  PlotRange -> {{0, 1.2}, {0, 1.2}, {0, 1}}];

"Boris Fain" <bfain at> wrote in message
news:aggkjf$ik$1 at
> Hi. I am a complete newbie, and I am making surface plots out of sets
> of points in 3-D. I am using TriangleSurfacePlot - a wonderful function
> btw, I gladly junked my own triangulation codes! However, I simply need
> to color the polygons according to their height - or the height of,
> say, the lowest vertex. Actually, any vertex would be just fine. Is
> there a way to do this?
> thanks, boris.

  • Prev by Date: Re: Integer Optimization
  • Next by Date: = versus := and trying to speed up calculations
  • Previous by thread: Re: ColorFunction TriangularSurfacePlot
  • Next by thread: RE: Re: ColorFunction TriangularSurfacePlot