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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Blinn, J.F.: A trip down the graphics pipeline: Line clipping. IEEE Computer Graphics & Applications 11(1), 98–105 (1991)
Cyrus, M., Beck, J.: Generalised two- and three-dimensional clipping. Computers & Graphics 3(1), 23–28 (1978)
Day, J.D.: A new two dimensional line clipping algorithm for small windows. Computer Graphics Forum 11(4), 241–245 (1992)
Dévai, F.: The average window is small. In: SIGGRAPH 1996 Technical Sketches (August 1996)
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)
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)
Foley, J.D., van Dam, A., Feiner, S.K., Hughes, J.F.: Computer Graphics: Principles and Practice. Addison-Wesley, Reading (1996)
Hearn, D., Baker, M.P.: Computer Graphics with OpenGL, 3rd edn. Prentice Hall, Englewood Cliffs (2004)
Liang, Y.-D., Barsky, B.A.: A new concept and method for line clipping. ACM Transactions on Graphics 3(1), 1–22 (1984)
Lu, G., Wu, X., Peng, Q.: An efficient line clipping algorithm based on adaptive line rejection. Computers & Graphics 26(3), 409–415 (2002)
Nicholl, R.A., Nicholl, T.M.: Performing geometric transformations by program transformation. ACM Transactions on Graphics 9(1), 28–40 (1990)
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)
Pitteway, M.L.V.: Personal communication (July 1998)
Sharma, N.C., Manohar, S.: Line clipping revisited: Two efficient algorithms based on simple geometric observations. Comput. & Graph. 16(1), 51–54 (1992)
Skala, V., Bui, D.H.: Extension of the Nicholl-Lee-Nicholl algorithm to three dimensions. The Visual Computer 17(4), 236–242 (2001)
Slater, M., Barsky, B.A.: 2D line and polygon clipping based on space subdivision. The Visual Computer 10(1), 407–422 (1994)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)