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.
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
Blina JF (1991) A trip down the graphics pipeline-line clipping. IEEE CG&A 11(1): 98–105
Bresenham JE (1965) Algorithm for computer control of digital plotter. IBM Syst J, 4(1): 25–30
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
Cytus M, Beck J (1978) Generalised two- and three-dimensional clipping. Comput. and Graph 3(1): 23–28
Dippe M, Swensen J (1984) An adaptive subdivision algorithm and parallel architecture for realistic image synthesis. Comput Graph (SIGGRAPH) 18(3): 149–158
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
Dorr M (1990) A new approach to parametric line clipping. Comput and Graph 14(3/4): 449–464
Foley JD, van Dam A, Feiner S, Hughes J (1990) Computer graphics: principles and practise. Addison-Wesley, Reading, MS
Fang DY, Chu JL (1990) A string pattern recognition approach to polygon clipping. Pattern Recogn 23(8): 879–892
Fujimoto A, Tanaka T, Iwata K (1986) ARTS: Accelerated Ray-Tracing System. IEEE CG&A 6(4): 16–26
Fung KY, Nicholl TM, Tarjan RE, van Wyk CJ (1990) Simplified linear-time Jordan sorting and polygon clipping. Inf Process Lett 35: 85–92
Glassner AS (1984) Space subdivision for fast ray tracing. IEEE CG&A 4(1): 15–22
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
Liang Y-D, Barsky BA (1983) An analysis and algorithm for polygon clipping. Commun ACM 26: 868–877
Liang Y-D, Barsky BA (1984) A new concept and method for line clipping. ACM Trans Graph 3(1): 1–22
Liang Y-D, Barsky BA (1990) An improved parametric line clipping algorithm. In: Deprettere EF (ed) Algorithms and parallel VLSI architectures Conference Elsevier, Amsterdam
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
Newman WM, Sproull RF (1979) Principles of interactive computer graphics, 2nd edn. McGraw-Hill, New York
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
Nicholl RA, Nicholl TN (1990) Performing geometric transformations by program transformation. ACM Trans Graph 9(1): 28–40
Rappoport A (1991) An efficient algorithm for line and polygon clipping. Vis Comput 7(1): 19–28
Shi KK, Edwards JA, Cooper DC (1990) An efficient line clipping algorithm. Comput and Graph 14(2): 297–301
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
Slater M (1992) Tracing a ray through uniformly subdivided n-dimensional space. Vis Computer 9:39–46
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
Sutherland IE, Hodgman GW (1974) Reentrant polygon clipping. Commun ACM 17: 32–42
Tilove RB (1981) Line/polygon classification: a study of the complexity of geometrical classification. IEEE CCG&A April: 75–86
Ullner M (1983) Parallel machines for computer graphics. Ph.D. Thesis California Institute of Technology, Pasadena, California
Weiler K (1980) Polygon comparison using a graph representation. Comput Graph (SIGGRAPH) 14(4): 10–18
Weiler K, Atherton P (1977) Hidden surface removal using polygon area sorting. Comput Graph (SIGGRAPH) 11(2): 214–222
Author information
Authors and Affiliations
Rights 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
Issue Date:
DOI: https://doi.org/10.1007/BF01900665