Jump to content

Triangle mesh

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Iltseng (talk | contribs) at 02:34, 2 December 2007 (Added "NURBS" and "Point cloud" in See Also). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A triangle mesh is a construct used in computer graphics. It comprises a set of triangles (typically in three dimensions) that are connected by their common edges.

Many graphics software packages and hardware devices can operate more efficiently on triangles that are grouped into meshes than on a similar number of triangles that are presented individually. This is typically because computer graphics do operations on the vertices at the corners of triangles. With individual triangles, the system has to operate on three vertices for every triangle. In a large mesh, there could be eight or more triangles meeting at a single vertex - by processing those vertices just once, it is possible to do a fraction of the work and achieve an identical effect.

With OpenGL or DirectX graphics systems, arbitrary triangle meshes are not supported. However strips of triangles - (where each triangle shares one edge with one neighbour and another with the next) and triangle fans (a set of connected triangles sharing one central vertex) are dealt with efficiently resulting in the need to only process N+2 vertices in order to draw N triangles.

Triangle meshes, built from strips, fans and possibly single triangles are usually obtained by so-called tessellation of polygonal objects.

Another way of avoiding redundant vertex processing is by explicit vertex sharing. The definition of the vertices is separated from the triangle description. A whole batch of triangles is defined by a set of indices into the vertex array. The graphics system processes the vertices first and renders the triangles afterwards, using the index sets working on the transformed data. In OpenGL, this is supported by the glDrawRangeElements() primitive.

See also