1.30

Impact Factor

2.10

CiteScore

# A New Polygon Based Algorithm for Filling Regions

Hoo-Cheng Liu1, Mu-Hwa Chen1, Shou-Yiing Hsu2, Chaoyin Chien1, Tsu-Feng Kuo1 and Yih-Farn Wang1

1Department of Computer Science and Information Engineering, Tamkang University, Tamsui, Taiwan, R. O. C.
2Department of Information Management, National Defense Management College, Taipei, Taiwan, R. O. C.

Accepted: December 6, 1999
Publication Date: December 6, 1999

## ABSTRACT

Region filling is a fundamental operation in computer graphics and image processing. There are broadly two classes of region filling: polygon based and pixel based. The conventional polygon based region filling algorithm typically uses data structures of records and fields. Using these data structures, the region filling process slows down because of the time-consuming operations of records and fields. This paper proposes a new polygon based region filling algorithm by using the proposed data structures of triples. This results in use of more efficient triple operations involving arrays and elements to fill a region. Using data structures of triples, the y-coordinate modification problem that occurs in the conventional algorithm simply disappears. In addition, contrary to the conventional approach, which uses troublesome geometrical considerations in deciding the even number of elements in each linked list, the proposed triple model uses a simple criterion to meet the even number requirement. Most important of all is the fact that the proposed criterion is independent of the polygon geometry. The experimental results strongly support superiority of the proposed algorithm. It is verified that the proposed algorithm is both theoretically and experimentally better than the conventional algorithm.

Keywords: Region filling, Y-modification test, Active edge table, Edge table, Liu's criterion

## REFERENCES

1. [1] Ackland, B. D. and Weste, N. H., "The edge flag algorithm-A fill method for raster scan displays," IEEE Transactions on Computers, Vol. C-30 No. 1, pp. 41-47 (1981).
2. [2] Distante A. and Veneziani, N., "A Two-Pass Algorithm for Raster Graphics," Computer Graphics and Image Processing 20, pp. 288-295 (1982).
3. [3] Foley, J. D., Andries, V. D., Feiner, S. K. and Hughes, J. F., Computer Graphics Principles and Practice, Second Ed., Addison-Wesley, Reading, MA. (1990).
4. [4] Nakashima, K., Massashi, K., Katsumi, M., Yoshihiro, S., and Yasuaki, N., "A contour fill method for alpha-numeric character image generation," Proceedings of the Second International Conference on Document Analysis and Recognition, pp. 722-725 (1993).
5. [5] Pavlidis, T., "Contour filling in raster graphics," ACM computer Graphics, Vol. 15, No. 3., pp. 29-36 (1981).
6. [6] Pavlidis, T., "Filling algorithms for raster graphics," Computer Graphics and Image Processing 10, pp.126-141 (1979).
7. [7] Watt, A., 3D computer graphics, 2nd Ed., Addison-Wesley, Reading, MA. (1993).

2.1
2023CiteScore

69th percentile