[Numpy-discussion] constant shaded triangle mesh in mayavi2

Robert Kern robert.kern@gmail....
Thu Sep 30 15:38:21 CDT 2010

On Thu, Sep 30, 2010 at 15:30, Geoffrey Irving <irving@naml.us> wrote:
> Hello,
> I'm not sure where the correct place to ask questions about Mayavi, so
> feel free to redirect me elsewhere.


> I have a triangle mesh with a bunch of data on each face.  The only
> color-relevant argument to triangular_mesh I know about is scalars,
> which is one value per vertex.  Is there a way to set color per
> triangle, ideally with control over rgb separately so I can visualize
> three different fields at once?

Pretty difficult, unfortunately. The only way I have found is to
assign UV texture coordinates to the vertices and slap on a texture.
Assigning the UV coordinates is usually not easy.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the NumPy-Discussion mailing list