A New Concept and Method for Line Clipping
- 1 January 1984
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Graphics
- Vol. 3 (1) , 1-22
- https://doi.org/10.1145/357332.357333
Abstract
A new concept and method for line clipping is developed that describes clipping in an exact and mathematical form. The basic ideas form the foundation for a family of algorithms for twodimensional, three-dimensional, and four-dimensional (homogeneous coordinates) line clipping. The line segment to be clipped is mapped into a parametric representation. From this, a set of conditions is derived that describes the interior of the clipping region. Observing that these conditions are all of similar form, they are rewritten such that the solution to the clipping problem is reduced to a simple max/min expression. For each dimension, the mathematics are discussed, an example is given, the algorithm is designed, and a performance test is conducted. The new algorithm is compared with the traditional Sutherland-Cohen clipping algorithm. Using randomly generated data, the new algorithm showed a 36 percent, 40 percent, and 79 percent improvement for two-dimensional, three-dimensional, and four-dimensional clipping, respectively. One of the advantages of this algorithm is the quick rejection of line segments that are invisible. In addition, this algorithm can be easily generalized for clipping against any convex viewing volume.Keywords
This publication has 1 reference indexed in Scilit:
- An analysis and algorithm for polygon clippingCommunications of the ACM, 1983