Q: For the following polygon, prepare an initial sorted edge list and then make the active edge list for scan lines y = 5,20,30,35 Coordinates of the vertices are as shown in Figure.
Answer: First label the vertices and edges as shown in the Figure
Start with y = 0 and continue till y = 40. For y = 0 there are four edges, namely E0, E1, E2 and E3. The sorted edge table is created as follows:
Active edge lists (AEL) for scan lines y = 5, 20, 30, 35 are as follows.
Y = 5, AEL = { E0, E1, E2, E3}
Y = 20, AEL = { E6, E3}
Y = 30, AEL = { E6, E5, E4, E3}
Y = 35, AEL = { E6, E5, E4, E3}