CHAPTER 4
318
Graphics
v
a
1
v
c
3
2
v
b
v
m
11
v
d
v
k
10
v
l
v
k
=
v
d
v
e
5
4
9
8
v
j
v
f
v
g
v
h
=
v
a
6
v
h
7
v
g
v
h
v
a
1
6
5
4
v
b
v
c
2
v
d
3
v
m
=
v
b
v
i
v
f
v
e
Mesh 1
Mesh 2
FIGURE 4.18
Varying the value of the edge flag to create different shapes
The data for each vertex consists of the following items, reading in sequence from
higher-order to lower-order bit positions:
An edge flag, expressed in
BitsPerFlag
bits
A pair of horizontal and vertical coordinates, expressed in
BitsPerCoordinate
bits each
A set of
n
color components (where
n
is the number of components in the
shading’s color space), expressed in
BitsPerComponent
bits each, in the order
expected by the
sc
operator
Each set of vertex data must occupy a whole number of bytes. If the total number
of bits required is not divisible by 8, the last data byte for each vertex is padded at
the end with extra bits, which are ignored. The coordinates and color values are
decoded according to the
Decode
array in the same way as in an image dictionary
(see “Decode Arrays” on page 344).
If the shading dictionary contains a
Function
entry, the color data for each vertex
must be specified by a single parametric value
t
rather than by
n
separate color
components. All linear interpolation within the triangle mesh is done using the
t
values. After interpolation, the results are passed to the function(s) specified in
the
Function
entry to determine the color at each point.
Index Bookmark Pages Text
Previous Next
Pages: Index All Pages
This HTML file was created by VeryPDF PDF to HTML Converter product.