Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

2D line and polygon clipping based on space subdivision

  • Published:
The Visual Computer Aims and scope Submit manuscript

Abstract

This paper introduces a new approach to 2D line and polygon clipping against a rectangular clipping region, using space subdivision into cells, with the clipping region as the central cell. The line segment path is traced through the cells, and entries into and out of the cell corresponding to the clipping region enable computation of the intersection of the line segment with crossed cell edges. Tracing the line segment path is computationally very simple, leading to an algorithm that only computes intersections that the are part of the clipped line segment. The new algorithm is compared to other standard line clipping algorithms with simulations and operation counts.

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

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

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

Instant access to the full article PDF.

Similar content being viewed by others

Explore related subjects

Discover the latest articles, news and stories from top researchers in related subjects.

References

  • Andreev RD (1989) Algorithm for clipping arbitrary polygons. Comput Graph Forum 8(3): 183–91

    Google Scholar 

  • Blina JF (1991) A trip down the graphics pipeline-line clipping. IEEE CG&A 11(1): 98–105

    Google Scholar 

  • Bresenham JE (1965) Algorithm for computer control of digital plotter. IBM Syst J, 4(1): 25–30

    Google Scholar 

  • Cleary JG, Wyvill B, Birtistle GM, Vatti R (1983) Multiprocessor ray tracing, Tech Rep 83/128/17, Department of Computer Science, University of Calgary.

  • Cleary JG, Wyvill G (1988) Analysis of algorithm for fast ray tracing using uniform space subdivision. Vis Comput 4:65–83

    Google Scholar 

  • Cytus M, Beck J (1978) Generalised two- and three-dimensional clipping. Comput. and Graph 3(1): 23–28

    Google Scholar 

  • Dippe M, Swensen J (1984) An adaptive subdivision algorithm and parallel architecture for realistic image synthesis. Comput Graph (SIGGRAPH) 18(3): 149–158

    Google Scholar 

  • Duvanenko VJ, Robbins WE, Gyurcsik RS (1990) Improving line segment clipping. Dr Dobb's J Software Tools, 15(7): 36, 38, 40, 42, 44–5, 98, 100

    Google Scholar 

  • Dorr M (1990) A new approach to parametric line clipping. Comput and Graph 14(3/4): 449–464

    Google Scholar 

  • Foley JD, van Dam A, Feiner S, Hughes J (1990) Computer graphics: principles and practise. Addison-Wesley, Reading, MS

    Google Scholar 

  • Fang DY, Chu JL (1990) A string pattern recognition approach to polygon clipping. Pattern Recogn 23(8): 879–892

    Google Scholar 

  • Fujimoto A, Tanaka T, Iwata K (1986) ARTS: Accelerated Ray-Tracing System. IEEE CG&A 6(4): 16–26

    Google Scholar 

  • Fung KY, Nicholl TM, Tarjan RE, van Wyk CJ (1990) Simplified linear-time Jordan sorting and polygon clipping. Inf Process Lett 35: 85–92

    Google Scholar 

  • Glassner AS (1984) Space subdivision for fast ray tracing. IEEE CG&A 4(1): 15–22

    Google Scholar 

  • Kaplan MR (1985) A constant time ray tracer. SIGGRAPH 85 Tutorial, San Francisco

  • Kaplan MR (1987) The use of spatial coherence in ray tracing. In: Rogers DF, Earnshaw, RA (eds) Techniques for computer graphics. Springer, Berlin Heidelberg New York, pp 184–193

    Google Scholar 

  • Liang Y-D, Barsky BA (1983) An analysis and algorithm for polygon clipping. Commun ACM 26: 868–877

    Google Scholar 

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

    Google Scholar 

  • Liang Y-D, Barsky BA (1990) An improved parametric line clipping algorithm. In: Deprettere EF (ed) Algorithms and parallel VLSI architectures Conference Elsevier, Amsterdam

    Google Scholar 

  • Liang Y-D, Barsky BA, Slater M (1992) Some improvements to a parametric line clipping algorithm. Tech Rep 92/688, CS Division, Electrical Engineering and Computer Sciences, University of California at Berkeley

  • Liang Y-D, Barsky BA (1992) The optimal Tree Algorithm for line clipping. Technical Report No. UCB/CSD 92/691, Computer Science Division, Electrical Engineering and Computer Sciences Dept, University of California, Berkeley, California, USA

    Google Scholar 

  • Newman WM, Sproull RF (1979) Principles of interactive computer graphics, 2nd edn. McGraw-Hill, New York

    Google Scholar 

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

    Google Scholar 

  • Nicholl RA, Nicholl TN (1990) Performing geometric transformations by program transformation. ACM Trans Graph 9(1): 28–40

    Google Scholar 

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

    Google Scholar 

  • Shi KK, Edwards JA, Cooper DC (1990) An efficient line clipping algorithm. Comput and Graph 14(2): 297–301

    Google Scholar 

  • Skala V (1989) Algorithms for 2D line clipping. In: Hansmann W, Hopgood FRA, Strasser W (eds) Eurographics 89, proceedings. North-Holland, Amsterdam, pp 355–66

    Google Scholar 

  • Slater M (1992) Tracing a ray through uniformly subdivided n-dimensional space. Vis Computer 9:39–46

    Google Scholar 

  • Sobkow MS, Pospilsil P, Yang Y-H (1987) A fast two-dimensional line clipping algorithm via line encoding. Comput and Graph 11(4): 459–467

    Google Scholar 

  • Sutherland IE, Hodgman GW (1974) Reentrant polygon clipping. Commun ACM 17: 32–42

    Google Scholar 

  • Tilove RB (1981) Line/polygon classification: a study of the complexity of geometrical classification. IEEE CCG&A April: 75–86

    Google Scholar 

  • Ullner M (1983) Parallel machines for computer graphics. Ph.D. Thesis California Institute of Technology, Pasadena, California

    Google Scholar 

  • Weiler K (1980) Polygon comparison using a graph representation. Comput Graph (SIGGRAPH) 14(4): 10–18

    Google Scholar 

  • Weiler K, Atherton P (1977) Hidden surface removal using polygon area sorting. Comput Graph (SIGGRAPH) 11(2): 214–222

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Slater, M., Barsky, B.A. 2D line and polygon clipping based on space subdivision. The Visual Computer 10, 407–422 (1994). https://doi.org/10.1007/BF01900665

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01900665

Key words