Are You Sure This Really Works?

To assure you that the scan-line polygon fill algorithm is indeed valid, below is a demo application, implemented using the scan-line polygon fill algorithm. To use it:

  1. Draw a polygon within the work window. (If the last point does not meet the first point, don't worry. The application will automatically add another line between those two points.)
  2. Select the Fill button when you want the polygon to be filled. There must be at least three vertices before the fill will work. (Anything less than three points does not constitute a polygon.)
  3. Select the Clear button when you want to clear the polygon from the work window and start over. This may be done at any time.
  4. The color of the polygon may also be changed at any time. Select the desired color from the fill color choices and continue drawing. The application will automatically redraw all of the line segments of the perimeter when new edges are added. To fill the polygon in the new color, select the Fill button again.

Next Page | Previous Page | Main Page