Scan Line Algorithm For Polygon Filling

theDanijel

Distinguished
May 4, 2011
74
0
18,590
3
It's like printing in an ink jet printer. You draw one colour line from left edge of the polygon to the right edge, then repeat the same thing from top of the polygon to the botomn.
 

theDanijel

Distinguished
May 4, 2011
74
0
18,590
3
Homework? If you have the algorithm it should be self explaning.
it should go something like this:
foreach poligon
{
determine top and botomn
define current point and set it to top
while current point is not botomn
{
calculate left and right edge of polygon on the current point's height
draw horizontal line from left to right
set current point to next moveing to botomn (when current point is the same as botomn the loop will end)
}
}
 

ASK THE COMMUNITY