Scan Line Algorithm For Polygon Filling

Status
Not open for further replies.

theDanijel

Distinguished
May 4, 2011
150
0
18,710
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)
}
}
 
Status
Not open for further replies.