Scan Line Method: Submitted To: Prof. Ratnesh
Scan Line Method: Submitted To: Prof. Ratnesh
METHOD
Submitted to: Prof. Ratnesh
Submitted by:
7/10/2019 Ayush Falor- B027
Tanvi Garg- B028
WHAT IS SCAN LINE?
• A s c a n l i n e i n o n e l i n e , o r r o w, i n a
raster scanning pattern such as a
line of video on a cathode ray
tube (CRT) display of a television
s e t o r c o m p u t e r.
WHAT IS SCAN LINE METHOD?
• T h e E d g e Ta b l e − I t c o n t a i n s
• coordinate endpoints of each line in the
scene,
• the inverse slope of each line, and
• pointers into the polygon table to
connect edges to surfaces.
• The P o l y g o n Ta b l e − I t c o n t a i n s
• the plane coefficients,
• surface material properties,
• other surface data, and
• may be pointers to the edge table.
Scan line method
The scan line algorithm maintains the edge list in the edge table(ET). The
AET(Active Edge Table) contains only edges that cross the current scan
Line, sorted in order of increasing x. The scan line method of hidden
surface removal also stores a flag for each surface that is set on or off to
indicate whether a position along a scan line is inside or outside of the
surface. Scan lines are processed from left to right. At the leftmost
boundary of a surface, the surface flag is turned ON; and at the rightmost
boundary, it is turned OFF.
The figure (f) illustrates the scan line method for hidden surface removal.
As shown in the Fig. (f), the active edge list for scan line 1 contains the
information for edges AD, BC, EH and FG. for the positions along this
scan line between edges AD and BC, only the flag for surface S1 is ON.
Therefore, no depth calculations are necessary, and intensity information
for surface S1 is entered into the frame buffer. Similarly, between edges
EH and FG, only the flag for surface S2 is ON and during that portion of
scan line the intensity information for surface S2, is entered into the
frame buffer.
For scan line 2 in the figure (f), the active edge list contains edges AD,
EH, BC and FG. Along the scan line 2 from edge AD to edge EH, only
the flag for surfaces S1 is ON. However, between edges EH and BC, the
flags for both surfaces are ON. In this portion of scan line 2, the depth
calculations are necessary. Here we have assumed that the depth of S1
is less than the depth of S2 and hence the intensities of surface S1 are
loaded into the frame buffer. Then, for edge BC to edge FG portion of
scan line 2 intensities of surface S2 are entered into the frame buffer
because during that portion only flag for S2 is ON.
7
ALGORITHM:
COMPONENTS OF ALGORITHM
8
STEPS:
9
ADVANTAGES AND DISADVANTAGES
Logo here 10
THANK YOU!