Research Article

A Simple and Efficient Algorithm for Line and Polygon Clipping in 2-D Computer Graphics

by  Sushil Chandra Dimri
journal cover
International Journal of Computer Applications
Foundation of Computer Science (FCS), NY, USA
Volume 127 - Issue 3
Published: October 2015
Authors: Sushil Chandra Dimri
10.5120/ijca2015906352
PDF

Sushil Chandra Dimri . A Simple and Efficient Algorithm for Line and Polygon Clipping in 2-D Computer Graphics. International Journal of Computer Applications. 127, 3 (October 2015), 31-34. DOI=10.5120/ijca2015906352

                        @article{ 10.5120/ijca2015906352,
                        author  = { Sushil Chandra Dimri },
                        title   = { A Simple and Efficient Algorithm for Line and Polygon Clipping in 2-D Computer Graphics },
                        journal = { International Journal of Computer Applications },
                        year    = { 2015 },
                        volume  = { 127 },
                        number  = { 3 },
                        pages   = { 31-34 },
                        doi     = { 10.5120/ijca2015906352 },
                        publisher = { Foundation of Computer Science (FCS), NY, USA }
                        }
                        %0 Journal Article
                        %D 2015
                        %A Sushil Chandra Dimri
                        %T A Simple and Efficient Algorithm for Line and Polygon Clipping in 2-D Computer Graphics%T 
                        %J International Journal of Computer Applications
                        %V 127
                        %N 3
                        %P 31-34
                        %R 10.5120/ijca2015906352
                        %I Foundation of Computer Science (FCS), NY, USA
Abstract

The most popular lines clipping algorithms are Cohen-Sutherland and Liang-Barsky line clipping algorithm. These algorithms are complex and the steps of calculation are very high. This paper proposes a simple new line clipping algorithm for 2D space which uses the parametric equation of the line. This algorithm further easily extended to the polygon clipping by considering the edge of the polygon as a line. The proposed algorithm is numerically tested for a numbers of random line segments and the results show the simplicity and less complex behavior of the algorithm.

References
  • J. D. Foley, A. van Dam, S. K. Feiner and J. F. Hughes, “Computer Graphics: Principles and Practice”, Addison-Wesley, (2nd edition), (1996).
  • D. Hearn and P. Baker, “Computer Graphics with OpenGL”, 3rd ed., Prentice Hall, (2004).
  • D.F. Rogers. “Procedural elements for computer graphics”. New York: McGraw-Hill, 1985. P.111–87.
  • Y. D. Liang and B. A. Barsky, “A new concept and method for line clipping”, ACM Transactions on Graphics, vol. 3, no. 1, (1984).
  • M. Cyrus and J. Beck, ―Generalized Two and Three Dimensional Clipping,‖ Computers and Graphics, Vol. 3, No. 1, 1978, pp. 23-28.
  • T. M. Nicholl, D. T. Lee and R. A. Nicholl, “An efficient new algorithm for 2-D line clipping: its development and analysis”, Computer & Graphics, vol. 21, no. 4, (1987).
  • M. Dörr, “A new approach to parametric line clipping”, Computers & Graphics, vol. 14, no. 3-4, (1990).
  • N.C. Sharma, S.Manohar Line clipping revisited: two efficient algorithm basedon simple geometric observations. Computers and Graphics 1992;
  • V. Skala, “An efficient algorithm for line clipping by convex polygon”, Computers & Graphics, vol. 17, no. 4, (1993). 1992; 11(4): 241–5.
  • V. Skala, “A new approach to line and line segment clipping in homogeneous coordinates”, The Visual Computer, vol. 21, no. 11, (2005). D. F. Rogers, “Procedural Elements for Computer Graphics”, 2nd Edition, Tata McGraw-Hill, (2005).
  • V. Skala,―O (lg N) Line clipping Algorithm in E , ‖Computers and Graphics, Vol. 18, No. 4, 1994, pp. 517-527.
  • J. D. Day, “An algorithm for clipping lines in object and image space”, Computers & Graphics, vol. 16, no. 4, (1992).
  • L. Guodong , W.Xuanhui , P. Qunsheng “An efficient line clipping algorithm based on adaptive line rejection “Computers & Graphics 26 (2002) 409–415
  • R. Andreev and E. Sofianska, “New algorithm for two-dimensional line clipping”, Computers & Graphics, vol. 15, no. 4, (1991).
  • M.S. Sobleow,P. Pospisil, Y.H .Yang,: A Fast Two Dimensional Line Clipping Algorithm via Line Encoding, Computers & Graphics, Vol.11, No.4, pp.459-467, 1987.
Index Terms
Computer Science
Information Sciences
No index terms available.
Keywords

Line clipping algorithm Cohen-Sutherland line clipping algorithm Liang-Barsky line clipping algorithm. 2D space

Powered by PhDFocusTM