Graphics Reference
In-Depth Information
Chapter 8
A Simple Way to Describe
Shape in 2D and 3D
8.1 Introduction
We now turn to a discussion of the triangle mesh, the most widely used repre-
sentation of shape in graphics. Triangle meshes consist of many triangles joined
along their edges to form a surface (see Figure 8.1). Other meshes, in which the
basic elements are quads (quadrilaterals), or other polygons are sometimes used,
but there can be problems associated with them. For instance, it's easy to create a
quadrilateral whose four vertices do not all lie in a plane; how should the interior
be filled in? For triangles, this is not a problem: There's always a plane containing
any three vertices. Because triangle meshes are so widespread, we concentrate on
them in this chapter.
Figure 8.1: A triangle mesh, con-
sisting of vertices, edges, and tri-
angular faces.
It's easy to see how to create certain shapes with triangle meshes. Starting with
any polyhedron, for instance, we can subdivide the faces into triangles. Figure 8.2
shows this for the cube. For more complex shapes, it's possible to approximate
the shape with a mesh. One way to do this is to find the locations of many points
on the shape, and then connect adjacent locations with a mesh structure. Such an
approximation, if the points are close enough to one another, can look very much
like a smooth surface. Consider the case of the icosahedron, which looks a lot
like a sphere: Each point of the icosahedral mesh is very close to a point of the
sphere, and vice versa. Similarly, each normal vector to a triangle mesh is very
close to a vector normal to the sphere at a corresponding point, and vice versa.
There is a distinction, however: The function that assigns normal vectors to points
of the sphere is continuous, while for the icosahedron, it's piecewise constant
(the normal vector doesn't change as you move about on a triangular facet). This
distinction can be important when we try to consider the reflection of light from
surfaces described with planar facets.
187
 
 
 
 
Search WWH ::




Custom Search