A New Method for Filling a 2D-Polygon
Abstract
Polygon filling process often involves with lot of procedures which are repeatedly called by one another and making lot of calculations and data reordering works to fill a polygon. One way for improving the efficiency of a polygon filling algorithm is to save the unnecessary calculations and reordering works demanded by traditional algorithms either for rejecting some reordering works or for avoiding some sorting and calculations works. An adaptive filling algorithm is presented here to achieve this goal. The filling process of our new algorithm, NH algorithm, consists of five steps. Firstly, we read the value of edges of a polygon and avoiding the sorting of the sides which are normally required in a traditional algorithm. Secondly, we calculated all boundary points for each sides of a polygon between its maximum and minimum y value. Thirdly, we find all boundary points for each scan level. Fourthly, we sort all boundary points in the order of their minimum x values. And finally, even number of boundary points are selected and filled. Here, the data reordering analysis and experimental statistics between these two algorithms demonstrate the high efficiency of our new algorithm.
Keywords
Full Text:
PDFReferences
S. Harrington, Computer graphics – A programming approach, McGraw Hill Book Company, 2nd edition, 1987.
Foley, J.D., Andries, V.D., Feiner, S.K., and Hughes, J.F., Computer Graphics Principles and Practice, Addison-Wesley, 2nd edition, 1990
Hoo-Cheng Liu, “ A New Polygon Based Algorithm for Filling Regions”, Tamkang Journal of science and Engineering, Vol 2 No 4,pp175-186,2000
K. Natarajan, Dr.K. Kuppusamy, “An enhanced method for filling a 2D-Polygon”, to be published.
Pavlidis, T., “Contour filling in raster graphics,” ACM Computer Graphics, Vol.15, No. 3., pp. 29-36(1981).
Pavildis, T., “Filling algorithms for raster graphics,” Computer Graphics and Image Processing 10, pp. 126-141 (1979).
Watt, A., 3D Computer Graphics, 2nd Edition., Addison-Wesley, Reading, MA. (1993).
Refbacks
- There are currently no refbacks.
This work is licensed under a Creative Commons Attribution 3.0 License.