Skip to main content
Log in

A new approach to line and line segment clipping in homogeneous coordinates

  • original article
  • Published:
The Visual Computer Aims and scope Submit manuscript

Abstract

The clipping operation is still the bottleneck of the graphics pipeline in spite of the latest developments in graphical hardware and a significant increase in performance. Algorithms for line and line segment clipping have been studied for a long time and many research papers have been published so far. This paper presents a new robust approach to line and line segment clipping using a rectangular window. A simple extension for the case of convex polygon clipping is presented as well.

The presented approach does not require a division operation and uses homogeneous coordinates for input and output point representation. The proposed algorithms can take advantage of operations supported by vector–vector hardware.

The main contribution of this paper is a new approach to intersection computations applied to line and line segment clipping. This approach leads to algorithms that are simpler, robust, and easy to implement.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Bui DH, Skala V (1998) Fast algorithms for clipping lines and line segments in E2. Vis Comput 14(1):31–37

    Article  Google Scholar 

  2. Bui DH (1999) Algorithms for line clipping and their complexity. Dissertation, University of West Bohemia

  3. Coxeter HSM (1961) Introduction to geometry. Wiley, New York

  4. Cyrus M, Beck J (1978) Generalized two- and three-dimensional clipping. Comput Graph 2(1):23–28

    Article  Google Scholar 

  5. Foley DJ, van Dam A, Feiner SK, Hughes JF (1990) Computer graphics – principles and practice. Addison-Wesley, Boston

  6. Hartley R, Zisserman A (2000) Multiview geometry in computer vision. Cambridge University Press, Cambridge

  7. Hill FS (2001) Computer graphics using OpenGL. Prentice-Hall, New York

  8. Huang YQ, Liu YK (2002) An algorithm for line clipping against a polygon based on shearing transformations. Comput Graph Forum 21(4):683–688

    Article  Google Scholar 

  9. Johnson M (1996) Proof by duality: or the discovery of “new” theorems. Math Today, pp. 171–174, November/December

    Google Scholar 

  10. Liang Y, Barsky B (1984) A new concept and method for line clipping. ACM Trans Graph 3(1):1–22

    Article  Google Scholar 

  11. Maillot PG (1992) A new, fast method for 2D polygon clipping: analysis and software implementation. ACM Trans Graph 11:276–290

    Article  Google Scholar 

  12. Nicholl TM, Lee DT, Nicholl RA (1987) An efficient new algorithm for 2-D line clipping: its development and analysis. In: SIGGRAPH Proceedings 21(4):253–262

  13. Rappaport A (1991) An efficient algorithm for line and polygon clipping. Vis Comput 7(1):19–28

    Article  Google Scholar 

  14. Skala V (1989) Algorithm for 2D line clipping. In: Proceedings of Computer Graphics International ’89, pp 121–128

  15. Skala V (1993) An efficient algorithm for line clipping by convex polygon. Comput Graph 17(4):417–421

    Article  Google Scholar 

  16. Skala V (1994) O(lg N) line clipping algorithm in E2. Comput Graph 18(4):517–524

    Article  Google Scholar 

  17. Skala V (1996) An efficient algorithm for line clipping by convex polygon and non-convex polyhedrons in E3. Comput Graph Forum 15(1):61–68

    Article  Google Scholar 

  18. Skala V (1996) Line clipping in E2 with suboptimal compexity O(1). Comput Graph 20(4):523–530

    Article  Google Scholar 

  19. Skala V, Bui DH (2001) Extension of the Nicholls–Lee–Nichols algorithm to three dimensions. Vis Comput 17:236–242

    Article  Google Scholar 

  20. Stolfi J (2001) Oriented projective geometry. Academic Press, Burlington

  21. Zhang M, Sabharwal CL (2002) An efficient implementation of parametric line and polygon clipping algorithm. In: Proceedings of the ACM Symposium on Applied Computing. ACM Press, New York, pp 796–800

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Vaclav Skala.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Skala, V. A new approach to line and line segment clipping in homogeneous coordinates. Visual Comput 21, 905–914 (2005). https://doi.org/10.1007/s00371-005-0305-3

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00371-005-0305-3

Keywords

Navigation