Filling algorithms for raster graphics

Abstract Two algorithms for filling irregular polygons are presented. They are both oriented towards raster graphics devices and use the refresh memory for part of their working space. One of them always does the filling correctly, unless the contour has an “impossible” topology (e.g., similar to the letter θ), and even then does not produce any leaks outside the external part of the contour. The other algorithm does the filling correctly only if the contour has no triple points, i.e., pixels which are common to three arcs. The first algorithm can be implemented in practice only within the microprocessor controlling the display, while the second can be implemented easily in the host computer and can use the refresher memory only for storage. Some of the simpler (and obvious) algorithms are discussed for comparison. The proposed algorithms do not use decomposition into simpler polygons. They can easily be adapted for shading according to any preassigned rule.