An efficient new algorithm for 2-D line clipping: Its development and analysis
- 1 August 1987
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGGRAPH Computer Graphics
- Vol. 21 (4) , 253-262
- https://doi.org/10.1145/37402.37432
Abstract
This paper describes a new alorithm for clipping a line in two dimensions against a rectangular window. This algorithm avoids computation of intersection points which are not endpoints of the output line segment. The performance of this algorithm is shown to be consistently better than existing algorithms, including the Cohen-Sutherland and Liang-Barsky algorithms. This performance comparison is machine-independent, based on an analysis of the number of arithmetic operations and comparisons required by the different algorithms. We first present the algorithm using procedures which perform geometric transformations to exploit symmetry properties and then show how program transformation techniques may be used to eliminate the extra statements involved in performing geometric transformations.Keywords
This publication has 3 references indexed in Scilit:
- A New Concept and Method for Line ClippingACM Transactions on Graphics, 1984
- Syntactic source to source transforms and program manipulationCommunications of the ACM, 1979
- A clipping dividerPublished by Association for Computing Machinery (ACM) ,1968