Professional Documents
Culture Documents
0411 B PDF
0411 B PDF
− Basic algorithm:
For y = ymin to ymax
ymax
p0 p1 p2 p3
ymin
However, we need to handle some special
Special handling:
Define interior:
For a given pair of intersectin points
(Xi, Y), (Xj, Y)
ymax
e1 e2
scanline
p0 p1 p2
ymin
p0
e1 p1 p2 p3
e2
Rule:
ymax
e1 e2
scanline Yes, count
p0 p1 p2 p1 for both
e1 and e2
ymin
p0
e1 p1 p2 p3 No, don’t count
p1 for the edge e2
e2