HTML and CSS Reference
In-Depth Information
Using triangles
There are a number of advantages to using triangles. With a triangle, no matter where you place its three
vertices, you can be sure that all the points of the polygon are always on the same plane, with the face of
the triangle pointing in a single direction. This direction, or surface normal , is perpendicular to the face of
the triangle and is shown in Figure 16-8. If you move the vertices using another type of polygon, it's
possible that the points could wind up on multiple planes and distort the shape. Using the previous
example, take some of the points that make up the letter E, and randomly change their z position.
Although you might get some interesting results, they can also quickly become unexpected and
unpredictable.
Normal
Vertex 2
Vertex 3
Vertex 1
Figure 16-8. The surface normal of a 3D triangle
Another advantage for triangles, is that any complex polygon can be drawn by only using triangles.
Consider Figure 16-9, for example.
Figure 16-9. More complex 3D shape
 
Search WWH ::




Custom Search