Triangle mesh
Encyclopedia
A triangle mesh is a type of polygon mesh
Polygon mesh
A polygon mesh or unstructured grid is a collection of vertices, edges and faces that defines the shape of a polyhedral object in 3D computer graphics and solid modeling...

 in computer graphics
Computer graphics
Computer graphics are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware....

. It comprises a set of triangle
Triangle
A triangle is one of the basic shapes of geometry: a polygon with three corners or vertices and three sides or edges which are line segments. A triangle with vertices A, B, and C is denoted ....

s (typically in three dimension
Dimension
In physics and mathematics, the dimension of a space or object is informally defined as the minimum number of coordinates needed to specify any point within it. Thus a line has a dimension of one because only one coordinate is needed to specify a point on it...

s) that are connected by their common edges or corners.

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.

Representation

Various methods of storing and working with a mesh in computer memory are possible. With the OpenGL
OpenGL
OpenGL is a standard specification defining a cross-language, cross-platform API for writing applications that produce 2D and 3D computer graphics. The interface consists of over 250 different function calls which can be used to draw complex three-dimensional scenes from simple primitives. OpenGL...

 and DirectX
DirectX
Microsoft DirectX is a collection of application programming interfaces for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with Direct, such as Direct3D, DirectDraw, DirectMusic, DirectPlay,...

 APIs there are two primary ways of passing a triangle mesh to the graphics hardware, triangle strip
Triangle Strip
A triangle strip is a series of connected triangles, sharing vertices, allowing for faster rendering and more efficient memory usage for computer graphics. They are optimized on most graphics cards, making them the most efficient way of describing an object. There are two primary reasons to use...

s and index arrays.

Triangle Strip

One way of sharing vertex data between triangles is the triangle strip. With strips of triangles
Triangle Strip
A triangle strip is a series of connected triangles, sharing vertices, allowing for faster rendering and more efficient memory usage for computer graphics. They are optimized on most graphics cards, making them the most efficient way of describing an object. There are two primary reasons to use...

 each triangle shares one complete edge with one neighbour and another with the next. OpenGL also supports the triangle fan
Triangle fan
frame|Set of connected triangles described by vertices A through F.A triangle fan is a primitive in 3D computer graphics that saves on storage and processing time. It describes a set of connected triangles that share one central vertex...

 which is a set of connected triangles sharing one central vertex. With these methods vertices
Vertex (computer graphics)
A vertex in computer graphics is a data structure that describes a point in 2D or 3D space. Display objects are composed of arrays of flat surfaces and vertices define the location and other attributes of the corners of the surfaces.-Application to object models:In computer graphics, objects are...

 are dealt with efficiently resulting in the need to only process N+2 vertices in order to draw N triangles.

Triangle strips are efficient, however the drawback is that it may not be obvious how or convenient to translate an arbitrary triangle mesh into strips.

Index Array

See also: Face-Vertex Meshes


With index arrays, a mesh is represented by two separate arrays, one array holding the vertices, and another holding sets of three indices into that array which define a triangle. 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 glDrawElements primitive when using Vertex Buffer Object
Vertex Buffer Object
A Vertex Buffer Object is an OpenGL extension that provides methods for uploading data to the video device for non-immediate-mode rendering...

 (VBO).

With this method, any arbitrary set of triangles sharing any arbitrary number of vertices can be stored, manipulated, and passed to the graphics API, without any intermediary processing.

See also

  • Polygon mesh
    Polygon mesh
    A polygon mesh or unstructured grid is a collection of vertices, edges and faces that defines the shape of a polyhedral object in 3D computer graphics and solid modeling...

  • Nonobtuse mesh
    Nonobtuse mesh
    A nonobtuse triangle mesh is composed of a set of triangles in which every angle is less than or equal to 90° we call these triangles nonobtuse triangles. If each face angle is strictly less than 90◦, then the triangle mesh is said to be acute...

  • Nonuniform rational B-spline
    Nonuniform rational B-spline
    Non-uniform rational basis spline is a mathematical model commonly used in computer graphics for generating and representing curves and surfaces which offers great flexibility and precision for handling both analytic and freeform shapes.- History :Development of NURBS began in the 1950s by...

  • Point cloud
    Point cloud
    A point cloud is a set of vertices in a three-dimensional coordinate system. These vertices are usually defined by X, Y, and Z coordinates, and typically are intended to be representative of the external surface of an object....

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK