Page 172 - DCAP504_Computer Graphics
P. 172
Unit 11: Hidden Surfaces
Figure 11.3 depicts the scan line method.
Figure 11.3: Scan Line Method
As shown in the figure 11.3, for scan line 1, the active edge list contains the information for edges AD,
BC, PS, and QR. Between edges AD and BC only the flag for surface S 1 is on. Hence, there is no depth
calculations required. The intensity information for surface S 1 is entered into the frame buffer. Between
edges PS and QR, only the flag for surface S 2 is on. The information of intensity is entered for surface S 2
into the frame buffer.
As shown in the figure 11.3, for scan line 2 the active edge list contains the information for edges AD,
PS, BC, and QR. Between edges AD and PS, only the flag for surface S 1 is on. Between edges PS and BC,
the flags for both surfaces are on. In this portion of scan line 2, depth calculations are required. Here we
assume that the depth of surface S 2 is more than the depth of surface S 1 and hence the intensities of S 1
are loaded into the frame buffer. Between edges BC and QR of scan line 2, intensities of surface S 2 are
entered into the frame buffer because during that portion only flag for surface S 2 is on.
To implement this algorithm along with Active Edge Table (AET) it is required to maintain a Polygon
Table (PT). This PT contains at least the following information for each polygon.
1. Coefficient of the plane equation
2. Color information for the polygon
3. In-out Boolean flag
Following figure 11.4 shows the edge table (ET), polygon table (PT) for the scan line algorithm.
Figure 11.4: ET, PT for the Scan line algorithm
LOVELY PROFESSIONAL UNIVERSITY 165