
112 4. Basic visualization
Pixel rows
Pixel columns
j+1
i+1i–1
x
0,0
y
i j–1
j
f
b
f
r
f
t
f
L
Figure 4.14: When a point, P , is projected to the view plane its coordinates, (X, Y ),
will not always be dead center in pixel i, j. Blending the brightness of P into adjacent
pixels i, j + 1 ,i + 1, j and i + 1, j + 1 will help to lessen the effect of the display r a s t er
(or framebuffer) being composed of discrete elements.
The projected point is (X, Y ) ( float data types)
Function f rac(x) returns the fractional part of x *
Each pixel is one unit square
i = X //rounded d own to integer
j = Y
f
l
= 1 − frac(X)
f
r
= frac(X + 1)
f
t
= 1 − frac(Y )
f
b
= frac(Y + 1)
set pixel (i, j)