Skip to main content

Analysis of the Nicholl-Lee-Nicholl Algorithm

  • Conference paper
Computational Science and Its Applications – ICCSA 2005 (ICCSA 2005)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 3480))

Included in the following conference series:

Abstract

The algorithm proposed by Nicholl, Lee and Nicholl (Computer Graphics 21,4 pp 253–262) for clipping line segments against a rectangular window in the plane is proved to be optimal in terms of the minimum and maximum number of comparisons and the number of predicates used. It is also demonstrated that, due to its overhead, the algorithm in its compact form is slightly slower than simple algorithms. Though Nicholl et al proposed program-transformation techniques to expand the code to exploit the full potential of the algorithm, in some cases it takes more operations than simple algorithms, e.g., two intersections and three predicates instead of four intersections. While the algorithm is optimal on its own terms, it solves the clipping problem with the added restriction that only valid intersections are allowed to be calculated.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 139.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Blinn, J.F.: A trip down the graphics pipeline: Line clipping. IEEE Computer Graphics & Applications 11(1), 98–105 (1991)

    Article  Google Scholar 

  2. Cyrus, M., Beck, J.: Generalised two- and three-dimensional clipping. Computers & Graphics 3(1), 23–28 (1978)

    Article  Google Scholar 

  3. Day, J.D.: A new two dimensional line clipping algorithm for small windows. Computer Graphics Forum 11(4), 241–245 (1992)

    Article  Google Scholar 

  4. Dévai, F.: The average window is small. In: SIGGRAPH 1996 Technical Sketches (August 1996)

    Google Scholar 

  5. Dévai, F.: An analysis technique and an algorithm for line clipping. In: Proc. 1998 IEEE Conference on Information Visualization, IV 1998, July 1998, pp. 157–165 (1998)

    Google Scholar 

  6. Duvanenko, V.J., Gyurcsik, R.S., Robbins, W.E.: Simple and efficient 2D and 3D span clipping algorithms. Computers & Graphics 17(1), 39–54 (1993)

    Google Scholar 

  7. Foley, J.D., van Dam, A., Feiner, S.K., Hughes, J.F.: Computer Graphics: Principles and Practice. Addison-Wesley, Reading (1996)

    MATH  Google Scholar 

  8. Hearn, D., Baker, M.P.: Computer Graphics with OpenGL, 3rd edn. Prentice Hall, Englewood Cliffs (2004)

    Google Scholar 

  9. Liang, Y.-D., Barsky, B.A.: A new concept and method for line clipping. ACM Transactions on Graphics 3(1), 1–22 (1984)

    Article  MATH  Google Scholar 

  10. Lu, G., Wu, X., Peng, Q.: An efficient line clipping algorithm based on adaptive line rejection. Computers & Graphics 26(3), 409–415 (2002)

    Article  Google Scholar 

  11. Nicholl, R.A., Nicholl, T.M.: Performing geometric transformations by program transformation. ACM Transactions on Graphics 9(1), 28–40 (1990)

    Article  MATH  Google Scholar 

  12. Nicholl, T.M., Lee, D.T., Nicholl, R.A.: An efficient new algorithm for 2-D line clipping: its development and analysis. Comput. Graph. 21(4), 253–262 (1987)

    Article  Google Scholar 

  13. Pitteway, M.L.V.: Personal communication (July 1998)

    Google Scholar 

  14. Sharma, N.C., Manohar, S.: Line clipping revisited: Two efficient algorithms based on simple geometric observations. Comput. & Graph. 16(1), 51–54 (1992)

    Article  Google Scholar 

  15. Skala, V., Bui, D.H.: Extension of the Nicholl-Lee-Nicholl algorithm to three dimensions. The Visual Computer 17(4), 236–242 (2001)

    Article  MATH  Google Scholar 

  16. Slater, M., Barsky, B.A.: 2D line and polygon clipping based on space subdivision. The Visual Computer 10(1), 407–422 (1994)

    Article  Google Scholar 

  17. Sobkow, M.S., Pospisil, P., Yang, Y.-H.: A fast two-dimensional line clipping algorithm via line encoding. Computers & Graphics 11(4), 459–467 (1987)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Dévai, F. (2005). Analysis of the Nicholl-Lee-Nicholl Algorithm. In: Gervasi, O., et al. Computational Science and Its Applications – ICCSA 2005. ICCSA 2005. Lecture Notes in Computer Science, vol 3480. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11424758_75

Download citation

  • DOI: https://doi.org/10.1007/11424758_75

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-25860-5

  • Online ISBN: 978-3-540-32043-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics