CS216
Chris Pollett
Apr 15, 2010
for each object O in the world do
begin
Find the part A of O that is visible
Display A appropriately
end;
for each pixel on the screen do
begin
Determine the visible object O that is pierced
by the ray from the viewer determined by the pixel
if there is such an O
then display the pixel appropriately
else display the pixel in the background color
end;
Precompute for each object a visibility ordering Scan convert objects to image space in a back-to-front order
The steps to construct the BSP tree are as follows:
To make this algorithm faster one often takes in Step (1) the polygon that cuts the fewest other polygons. In fact, it often suffices for efficiency just to pick five polygons at random and choose amongst these the one that cuts the fewest polygons.