Abstract
Line segment clipping is a basic operation of the visualization process in computer graphics. So far there exist four computational models for clipping a line segment against a window, (1) the encoding, (2) the parametric, (3) the geometric transformation, and (4) the parallel cutting. This paper presents an algorithm that is based on the third method. By making use of symmetric properties of a window and transformation operations, both endpoints of a line segment are transformed, so that the basic cases are reduced into two that can be easily handled, thus the problems in NLN and AS where there are too many sub-procedure calls and basic cases that are difficult to deal with are tackled. Both analytical and experimental results from random input data show that the algorithm is better than other developed ones, in view of the speed and the number of operations.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Foley J D, van Dam A, Feiner S K, Hughes J F. Computer Graphics Principles and Practice, 2nd ed. Addison-Wesley, Reading, MA, 1990.
Kaijian S, Edwards J A, Cooper D C. An efficient line clipping algorithm.Computers & Graphics, 1990, 14: 297–301.
Duvanenko V J, Gyurcsik R S, Robbins W E. Simple and efficient 2D and 3D span clipping algorithms.Computers & Graphics, 1993, 17: 39–54.
Pang Min, Shen Mengtao, Deng Chao. An improved Cohen-Sutherland algorithm for 2D line clipping.Journal of Computer-Aided Design & Computer Graphics, 1993, 5(7): 191–194.
Sobkow M S, Pospisil P, Yang Y H. A fast two-dimensional line clipping algorithm via line encoding.Computers & Graphics, 1987, 11: 459–467.
Cyrus M, Beck J. Generalized two- and three- dimensional clipping.Computers & Graphics, 1978, 3: 23–28.
Liang Y D, Barsky B A. A new concept and method for line clipping.ACM Transaction on Graphics, 1984, 3: 1–22.
Skala V. An efficient algorithm for line clipping by convex polygon.Computers & Graphics, 1993, 17(4): 417–421.
Dorr M. A new approach to parametric line clipping.Computers & Graphics, 1990, 14: 449–464.
Nicholl T M, Lee D T, Nicholl R A. An efficient new algorithm for 2-D line clipping: Its development and analysis.Computer Graphics, 1987, 21(4): 253–262.
Andeev R, Sofianska E. New algorithm for two-dimensional line clipping.Computers & Graphics, 1991, 15(4): 519–526.
Wang Jun, Liang Youdong, Peng Qunsheng. A 2-D line clipping algorithm with the least arithmetic operations.Chinese Journal of Computers, 1991, 14(7): 495–504.
Day J D. An algorithm for clipping lines in object and image space.Computers & Graphics, 1992, 16: 421–426.
Sharma N C, Manohar S. Line clipping revisited: Two efficient algorithms based on simple geometric observations.Computers & Graphics, 1992, 16: 51–54.
Skala V.O(lgN) line clipping algorithm in E2.Computers & Graphics, 1994, 18: 517–524.
Andeev R D. Algorithm for clipping arbitrary polygons.Computer Graphics Forum, 1989, (8): 183–191.
Author information
Authors and Affiliations
Additional information
Wang Haohong is currently a Ph.D. candidate at New Mexical, University. He obtained his M.S. degree in computer science from Nanjing University in 1997.
Wu Ruixun is currently working in Ahuhai Post Office. He obtained his B.S. degree in computer science from Nanjing University in 1996.
Cai Shijie is a Professor in Computer Science Department of Nanjing University. His research interests include computer graphics, human-computer interaction-and CAD.
Rights and permissions
About this article
Cite this article
Wang, H., Wu, R. & Cai, S. A new algorithm for two-dimensional line clipping via geometric transformation. J. of Comput. Sci. & Technol. 13, 410–416 (1998). https://doi.org/10.1007/BF02948499
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF02948499