Graphics Reference
In-Depth Information
Considering symmetry, there are really only four cases to consider in computing b , the coverage
fraction for the surface f: whole, corner, split, and two-opposite corners. Whole refers to the simple
cases in which the entire pixel is covered by one surface (cases a and p in Figure A.8 ) ; in this case,
b equals either 1 or 0. Corner refers to the cases in which one surface covers the entire pixel except
for one corner (cases b, c, e, h, i, l, n, and o in Figure A.8 ) . If f is the corner surface, then the coverage is
b ¼
s t
2
, where s and t
represent the fraction of the edge indicated by the z -value interpolation as
s 2 . Split refers to the
situation in which the vertices of opposite edges are tagged differently (cases d, g, j, and m in
Figure A.8 ) ; the coverage of the surface is b ¼
measured from the corner vertex. If b is the corner surface, then b ¼
1
:
0
s þ 2 , where s and t represent the fraction of the edge
indicated by the z -value interpolation as measured from the vertices tagged “1” toward the other ver-
tices. The fraction for the other surface would be b ¼
s þ 2 . If each vertex is tagged the same as
that diagonally opposite of it, but the diagonally opposite pairs are tagged differently (cases f and k in
Figure A.8 ), the equation for b can be approximated by computing the fractional distance along each
pixel edge according to the z -value interpolation from the corners—for opposite pairs, use the same
direction to determine the fraction. For the opposite pairs of edges of the pixel, average the two frac-
tional distances. Use these distances as an axis-aligned subdivision of the pixel into four quadrants and
compute the areas of f and b .
Once b is computed, then that fraction of the pixel is considered as having the surface f as the
front surface and the rest of the pixel is considered as having the surface b as the front surface.
The comp operator is defined as the linear blend, according to the interpolant b , of two applications
of the over operator—one with surface f
1
:
0
in front and one with surface b in front ( Equation A.8 ) .
rgb c ¼ b ðrgb f þð
1
a f Þrgb b Þþð
1
b Þðrgb b þð
1
a b Þrgb f Þ
a c ¼ b ð a f þð
1
a f Þ a b Þþð
1
b Þð a b þð
1
a b Þ a f Þ
(A.8)
z c ¼ min ðz f ; z b Þ
Comp decides on a pixel-by-pixel basis which image represents a surface in front of the other,
including the situation in which the surfaces change relative depth within a single pixel. Thus, images
that are not disjoint in depth can be successfully composited using the comp operator, which is
commutative (with b becoming (1 - b )) but not associative. See Duff's paper [ 5 ] for a discussion.
A.3 Displaying moving objects: motion blur
If it is assumed that objects are moving in time, it is worth addressing the issue of effectively displaying
these objects in a frame of animation [ 6 ] [ 8 ] . In the same way that aliasing is a sampling issue in the spatial
domain, it is also a sampling issue in the temporal domain. As frames of animation are calculated, the
positions of objects change in the image, and this movement changes the color of a pixel as a function of
time. In an animation, the color of a pixel is sampled in the time domain. If the temporal frequency of a
pixel's color function is too high, then the temporal sampling can miss important information.
Consider an object moving back and forth in space in front of an observer. Assume the animation is
calculated at the rate of thirty frames per second. Now assume that the object starts on the left side of the
 
Search WWH ::




Custom Search