skip to main content
10.1145/37401.37432acmconferencesArticle/Chapter ViewAbstractPublication PagessiggraphConference Proceedingsconference-collections
Article
Free Access

An efficient new algorithm for 2-D line clipping: Its development and analysis

Published:01 August 1987Publication History

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.

References

  1. 1.Newman, W. M. and R. F. Sproull. Principles of Interactive Computer Graphics, 2nd ed., McGraw-Hill, New York, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.Sproull, R. F. and I. E. Sutherland. A Clipping Divider, FICC 1968, Thompson Books, Washington, D.C., pp. 765-775.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.Cyrus, M. and I. Beck. Generalised Two- and Three- Dimensional Clipping, Computers and Graphics, Vol. 3, No. 1, 1978, pp. 23-28.Google ScholarGoogle Scholar
  4. 4.Liang, Y.-D. and B. A. Barsky. A New Concept and Method for Line Clipping, ACM Transactions on Graphies, Vol. 3, No. 1, 1984, pp. 1-22. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.Sobkow, M. S., Pospisil, P. and Y.-II. Yang. A Fast Two- Dimensional Line Clipping Algorithm, University of Saskatchewan Technical Report, 86-2.Google ScholarGoogle Scholar
  6. 6.Hoare, C. A. R. et al. Laws of Programming: a tutorial paper, Oxford University Programming Research Group PRG-45, 1985.Google ScholarGoogle Scholar
  7. 7.Arsac, J. I. Syntactic Source to Source Transforms and Program Manipulation, Communications of the ACM, Vol. 22, No. 1, 1979, pp. 43-54. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. An efficient new algorithm for 2-D line clipping: Its development and analysis

                Recommendations

                Comments

                Login options

                Check if you have access through your login credentials or your institution to get full access on this article.

                Sign in
                • Published in

                  cover image ACM Conferences
                  SIGGRAPH '87: Proceedings of the 14th annual conference on Computer graphics and interactive techniques
                  August 1987
                  352 pages
                  ISBN:0897912276
                  DOI:10.1145/37401

                  Copyright © 1987 ACM

                  Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                  Publisher

                  Association for Computing Machinery

                  New York, NY, United States

                  Publication History

                  • Published: 1 August 1987

                  Permissions

                  Request permissions about this article.

                  Request Permissions

                  Check for updates

                  Qualifiers

                  • Article

                  Acceptance Rates

                  SIGGRAPH '87 Paper Acceptance Rate33of140submissions,24%Overall Acceptance Rate1,822of8,601submissions,21%

                  Upcoming Conference

                  SIGGRAPH '24

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader