CHAPTER 4
316
Graphics
where
f
is the vertex’s edge flag (discussed below)
x
and
y
are its horizontal and vertical coordinates
c
1
c
n
are its color components
All vertex coordinates are expressed in the shading’s target coordinate space. If
the shading dictionary includes a
Function
entry, only a single parametric value,
t,
is permitted for each vertex in place of the color components
c
1
c
n
.
The
edge flag
associated with each vertex determines the way it connects to the
other vertices of the triangle mesh. A vertex
v
a
with an edge flag value
f
a
=
0
begins a new triangle, unconnected to any other. At least two more vertices
(v
b
and
v
c
)
must be provided, but their edge flags are ignored. These three vertices
define a triangle (v
a
,
v
b
,
v
c
), as shown in Figure 4.16.
f
a
= 0
(Start new triangle)
Previous
triangle
v
a
v
b
v
c
FIGURE 4.16
Starting a new triangle in a free-form Gouraud-shaded triangle mesh
Subsequent triangles are defined by a single new vertex combined with two verti-
ces of the preceding triangle. Given triangle (v
a
,
v
b
,
v
c
), where vertex
v
a
precedes
vertex
v
b
in the data stream and
v
b
precedes
v
c
, a new vertex
v
d
can form a new
triangle on side
v
bc
or side
v
ac
, as shown in Figure 4.17. (Side
v
ab
is assumed to be
shared with a preceding triangle and therefore is not available for continuing the
mesh.) If the edge flag is
f
d
=
1 (side
v
bc
), the next vertex forms the triangle
(v
b
,
v
c
,
v
d
); if the edge flag is
f
d
=
2 (side
v
ac
), the next vertex forms the triangle
(v
a
,
v
c
,
v
d
). An edge flag of
f
d
=
0 would start a new triangle, as described above.
Index Bookmark Pages Text
Previous Next
Pages: Index All Pages
This HTML file was created by VeryPDF PDF to HTML Converter product.