Previous Next
317
SECTION 4.6 Patterns
fd =0 fd =1 fd =2
va va va vd
One new
vertex
vb vc vb vc vb vc
vd
One new
Three new vertex
vd
vertices
ve vf
FIGURE 4.17 Connecting triangles in a free-form Gouraud-shaded triangle mesh
Complex shapes can be created by using the edge flags to control the edge on
which subsequent triangles are formed. Figure 4.18 shows two simple examples.
Mesh 1 begins with triangle 1 and uses the following edge flags to draw each suc-
ceeding triangle:
1 ( fa = fb = fc = 0 ) 7 ( fi = 2 )
2 ( fd = 1 ) 8 ( fj = 2 )
3 ( fe = 1 ) 9 ( fk = 2 )
4 ( ff = 1 ) 10 ( f l = 1 )
5 ( fg = 1 ) 11 ( f m = 1 )
6 ( fh = 1 )
Mesh 2 again begins with triangle 1 and uses the following edge flags:
1 ( fa = fb = fc = 0 ) 4 ( ff = 2 )
2 ( fd = 1 ) 5 ( fg = 2 )
3 ( fe = 2 ) 6 ( fh = 2 )
The stream must provide vertex data for a whole number of triangles with appro-
priate edge flags; otherwise, an error occurs.
Previous Next