Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article
Free access

An optimal algorithm for intersecting line segments in the plane

Published: 02 January 1992 Publication History

Abstract

The main contribution of this work is an O(n log n + k)-time algorithm for computing all k intersections among n line segments in the plane. This time complexity is easily shown to be optimal. Within the same asymptotic cost, our algorithm can also construct the subdivision of the plane defined by the segments and compute which segment (if any) lies right above (or below) each intersection and each endpoint. The algorithm has been implemented and performs very well. The storage requirement is on the order of n + k in the worst case, but it is considerably lower in practice. To analyze the complexity of the algorithm, an amortization argument based on a new combinatorial theorem on line arrangements is used.

References

[1]
BAUMGART, B. G. A polyhedron representation for computer vision. In Proceedings of the 1975 National Computer Conference. AFIPS Conference Proceedings, vol. 44. AFIPS Press, Reston, Va., 1975, pp. 589-596.
[2]
BEN-OR, M. Lower bounds for algebraic computation trees. In Proceedings of the 15th Annual ACM Symposium Theory of Computing (Boston, Mass., Apr. 25-27). APS, New York, 1983, pp. 80- 86.
[3]
BENTLEY, J. L., AND OTTMANN, T. Algorithms for reporting and counting geometric intersections. IEEE Trans. Comput. C-28 (1979), 643-647.
[4]
BENTLEY, J. L., AND WOOD, D. An optimal worst-case algorithm for reporting intersections of rectangles. IEEE Trans. Comput. C-29 (1980), 571-577.
[5]
BRowN, K.Q. Comments on "Algorithms for reporting and counting geometric intersections." IEEE Trans. Comput. C-30 (1981), 147-148.
[6]
CHAZEIJ.E, B. Reporting and counting segment intersections. J. Comput. Sys. Sci. 32 (1986), 156-182.
[7]
CHAZVt, LE, B. A functional approach to data structures and its use in multidimensional searching. SIAM J. Comput. 17 (1988), 427-462.
[8]
CLARKSON, K.L. Applications of random sampling in computational geometry, II. In Proceedings of the 4th Annual A CM Symposium on Computational Geometry (Urbana-Champaign, Ill., June 6-8). ACM, New York, 1988, pp. 1-i 1.
[9]
DOBKIN. D. P., AND LIPTON, R. Multidimensional searching problems. SIAM J. Comput. 5 (1976), 181-186.
[10]
EDELSBRUNNER, H. Algorithms in Combinatorial Geometry. Springer-Verlag, Heidelberg, Germany, 1987.
[11]
EDELSBRUNNER, H., AND GUIBAS, L.J. Topologically sweeping an arrangement. In Proceedings of the 18th Annual A CM Symposium on the Theory of Computing (Berkeley, Calif., May 28-30). ACM, New York, 1986, pp. 389-403.
[12]
EDFLSBRVNNER, H., AND M/JC~E, E. P. Simulation of simplicity: A technique to cope with degenerate cases in geometric algorithms. In Proceedings of the 4th Annual A CM Symposium on Computational Geometry (Urbana-Champaign, Ill., June 6-8). ACM, New York, 1988, pp. 118-133.
[13]
FREDMAN, M. On the information theoretic lower bound. Theoret. Comput. Sci. 1 (1976), 355-361.
[14]
GumAs, L. J. AND SEDC, F.WTCK, R. A dichromatic framework for balanced tree~. In Proeoodings of the 19th Annual IEEE Symposium on Foundations of Computer Science, IEEE, New York, i978, pp. 8-21.
[15]
GUIBAS, L. J., AND SEIDEL, R. Computing convolutions using reciprocal search. In Proceedings of the 2nd Annual ACM Symposium on Computational Geometry (Yorktown Heights, N.Y., June 2-4). ACM, New York, 1986, pp. 90-99. '~
[16]
GUIBAS, L J., AND STOLFI, J. Primitives for the mampulatlon of general subdivisions and the computation of Voronoi diagrams. A CM Trans. Graph. 4, 2 (Apr 1985), 76-123.
[17]
HOFFMAN, K., MEHLHORN, K., ROSENSTIEHL, P., ~ND TARJAN, R. Sorting Jordan sequences xn linear hme using level-linked search trees. Inf. Contr. 68 (1986), 170-184.
[18]
MAIRSON, H. G., AND STOLFI, J. Reporting and counting intersections between two sets of hnc segments. In Proceedings of the NA TO Advanced Study, Institute on Theoretical Foundations of the Computational Graphics and CAD (I1 Clocco, Castelvecchio Pascoll, Italy). Sprmger-Verlag, Ncw York, 1987.
[19]
MULMULEY, K. A fast planar partition algorithm, I. In Proceedings of the 29th Annual IEEE Symposium on Foundations of Computer Science, IEEE, New York, 1988, pp. 580-589.
[20]
NEWMAN, W. M., AND SPROULL, R. F. Principles of interactive computer graphtcs. McGraw-Hill, New York, 1973.
[21]
NIEVERGELT, J., AND PREPARATA, F. P. Plane-sweep algorithm~ for intersecting geometric figures. Cornmun. ACM 25, 10 (Oct. 1982), 739-747
[22]
PREPARATA, F. P., AND SnAMOS, M. I. Computational geometry--An introduction Springer-Verlag, New York, 1985.
[23]
SEDGEWICK, R. Algorithms. Addison-Wesley, New York, I983.
[24]
TARJAN, R.E. Data structures and network algorithms SIAM, Philadelphia, Pa., 1983.

Cited By

View all
  • (2024)Per Segment Plane Sweep Line Segment Intersection on the GPUACM Transactions on Spatial Algorithms and Systems10.1145/3701989Online publication date: 28-Oct-2024
  • (2024)PDRC: Package Design Rule Checking via GPU-Accelerated Geometric Intersection Algorithms for Non-Manhattan GeometryProceedings of the 61st ACM/IEEE Design Automation Conference10.1145/3649329.3657367(1-6)Online publication date: 23-Jun-2024
  • (2024)Path Planning in a Weighted Planar Subdivision Under the Manhattan MetricGraphs and Combinatorics10.1007/s00373-023-02744-740:1Online publication date: 19-Jan-2024
  • Show More Cited By

Recommendations

Reviews

John B. Slater

A need to calculate efficiently the intersection points of sets of line segments arises naturally from the manipulation of display and related entities through, for instance, windowing, clipping, and hidden surface removal. This research paper introduces a new algorithm leading to an essentially optimal single-processor time complexity, although some space considerations are left undecided. The algorithm is a complicated one, based on a basic sweep technique using end points only in the schedule, analyzing the intersections of segments in front of the sweep line using information derived from its previous history. A good survey of all the relevant concepts in the area is given, providing a good background to recent work in this area. This background is backed up by well-chosen references. The specific geometrical knowledge required to follow the algorithm is essentially elementary, but a thorough understanding of complexity and a good working knowledge of a number of areas of computing algorithms and theory is required, as is geometrical insight. The algorithm, implemented in C, shows considerable ingenuity to reach the eventual complexity of O n log n+k time and O n+k space to compute the k intersections of n line segments. The space complexity is not demonstrably optimal, and possible improvement is discussed. Nevertheless, the result is excellent and well presented.

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Comments

Information & Contributors

Information

Published In

cover image Journal of the ACM
Journal of the ACM  Volume 39, Issue 1
Jan. 1992
251 pages
ISSN:0004-5411
EISSN:1557-735X
DOI:10.1145/147508
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 02 January 1992
Published in JACM Volume 39, Issue 1

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)201
  • Downloads (Last 6 weeks)21
Reflects downloads up to 10 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Per Segment Plane Sweep Line Segment Intersection on the GPUACM Transactions on Spatial Algorithms and Systems10.1145/3701989Online publication date: 28-Oct-2024
  • (2024)PDRC: Package Design Rule Checking via GPU-Accelerated Geometric Intersection Algorithms for Non-Manhattan GeometryProceedings of the 61st ACM/IEEE Design Automation Conference10.1145/3649329.3657367(1-6)Online publication date: 23-Jun-2024
  • (2024)Path Planning in a Weighted Planar Subdivision Under the Manhattan MetricGraphs and Combinatorics10.1007/s00373-023-02744-740:1Online publication date: 19-Jan-2024
  • (2024)Efficient Computation of Crossing Components and Shortcut HullsCombinatorial Algorithms10.1007/978-3-031-63021-7_39(509-522)Online publication date: 1-Jul-2024
  • (2023)An Efficient Region Merging Algorithm in Raster SpaceQualitative and Computational Aspects of Dynamical Systems10.5772/intechopen.102679Online publication date: 8-Feb-2023
  • (2023)Deployment Optimization of Tethered Drone-Assisted Integrated Access and Backhaul NetworksIEEE Transactions on Wireless Communications10.1109/TWC.2023.330188023:4(2668-2680)Online publication date: 10-Aug-2023
  • (2023)GIN: Graph-Based Interaction-Aware Constraint Policy Optimization for Autonomous DrivingIEEE Robotics and Automation Letters10.1109/LRA.2022.32278628:2(464-471)Online publication date: Feb-2023
  • (2023)Concyclic Intervals in the PlaneDiscrete & Computational Geometry10.1007/s00454-023-00515-y72:2(1010-1027)Online publication date: 24-May-2023
  • (2022)Robust computation of implicit surface networks for piecewise linear functionsACM Transactions on Graphics10.1145/3528223.353017641:4(1-16)Online publication date: 22-Jul-2022
  • (2022)Combinatorics of Intervals in the Plane I: TrapezoidsDiscrete & Computational Geometry10.1007/s00454-022-00456-y69:1(232-249)Online publication date: 6-Dec-2022
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media