Skip to main content

Algorithms for bichromatic line-segment problems and polyhedral terrains


We consider a variety of problems on the interaction between two sets of line segments in two and three dimensions. These problems range from counting the number of intersecting pairs between m blue segments andn red segments in the plane (assuming that two line segments are disjoint if they have the same color) to finding the smallest vertical distance between two nonintersecting polyhedral terrains in three-dimensional space. We solve these problems efficiently by using a variant of the segment tree. For the three-dimensional problems we also apply a variety of recent combinatorial and algorithmic techniques involving arrangements of lines in three-dimensional space, as developed in a companion paper.

This is a preview of subscription content, access via your institution.


  1. P. K. Agarwal, Intersection and decomposition algorithms for arrangements of curves in the plane, Ph.D. Thesis, New York University, 1989.

  2. P. K. Agarwal, Private communication, 1991.

  3. B. Chazelle, Reporting and counting segment intersections,J. Comput. System Sci. 32(2) (1986), 156–182.

    Google Scholar 

  4. B. Chazelle, An optimal convex hull algorithm and new results on cuttings,Proc. 32nd Ann. IEEE Symp. on Foundations of Computer Science, 1991, pp. 29–38.

  5. B. Chazelle, Cutting hyperplanes for divide-and-conquer,Discrete Comput. Geom. 9 (1993), 145–158.

    Google Scholar 

  6. B. Chazelle and H. Edelsbrunner, An optimal algorithm for intersecting line segments in the plane,J. Assoc. Comput. Mach. 39 (1992), 1–54.

    Google Scholar 

  7. B. Chazelle, H. Edelsbrunner, L. J. Guibas, M. Sharir, and J. Stolfi, Lines in space-combina-torics, algorithms, Tech. Report, Dept. Computer Science, Courant Institute, New York, 1990.

    Google Scholar 

  8. B. Chazelle and L. J. Guibas, Fractional cascading: I. A data structuring technique,Algorithmica 1 (1986), 133–162.

    Google Scholar 

  9. B. Chazelle and M. Sharir, An algorithm for generalized point location and its applications,J. Symbolic Comput. 10 (1990), 281–309.

    Google Scholar 

  10. R. Cole, J. Salowe, W. Steiger, and E. Szemerédi, An optimal-time algorithm for slope selection,SIAM J. Comput. 18 (1989), 792–810.

    Google Scholar 

  11. H. Edelsbrunner, L. J. Guibas, and J. Stolfi, Optimal point location in a monotone subdivision,SIAM J. Comput. 15 (1986), 317–340.

    Google Scholar 

  12. H. Edelsbrunner and E. P. Mücke, Simulation of simplicity: a technique to cope with degenerate cases in geometric algorithms,ACM Trans. Graphics 9(1) (1990), 66–104.

    Google Scholar 

  13. L. J. Guibas, M. H. Overmars and M. Sharir, Intersecting line segments, ray shooting, and other applications of geometric partitioning techniques, Tech. Report RUU-CS-88-26, Dept. Computer Science, University of Utrecht, 1988.

  14. L. J. Guibas and R. Seidel, Computing convolutions by reciprocal search,Discrete Comput. Geom. 2 (1987), 175–193.

    Google Scholar 

  15. J. Matoušek, Approximations and optimal geometric divide-and-conquer,Proc. 23rd Ann. ACM Symp. on Theory of Computing 1991, pp. 505–511.

  16. J. Matoušek, Efficient partition trees,Proc. 7th Ann. ACM Symp. on Computational Geometry, 1991, pp. 1–9.

  17. H. Mairson and J. Stolfi, Reporting and counting intersections between two sets of line segments, inTheoretical Foundations of Computer Graphics and CAD (R. A. Earnshaw, ed.), NATO ASI Series, Vol. F-40, Springer-Verlag, Berlin, 1988, pp. 307–325.

    Google Scholar 

  18. K. Mehlhorn and K. Simon, Intersecting two polyhedra one of which is convex, inProc. Fundamentals of Computer Theory, Lecture Notes in Computer Science, Vol. 199, Springer-Verlag, Berlin, 1985, pp. 534–542.

    Google Scholar 

  19. F. P. Preparata and M. I. Shamos,Computational Geometry—An Introduction, Springer-Verlag, New York, 1985.

    Google Scholar 

  20. M. Sharir, The shortest watchtower and related problems for polyhedral terrains,Inform. Process. Lett. 29 (1988), 265–270.

    Google Scholar 

  21. V. K. Vaishnavi and D. Wood, Rectilinear line segment intersection, layered segment trees and dynamization,J. Algorithms 2 (1982), 160–176.

    Google Scholar 

Download references

Author information

Authors and Affiliations


Additional information

Communicated by D. T. Lee.

Work on this paper by the first author has been supported in part by the National Science Foundation under Grant CCR-9002352. Work by the second author was supported in part by the National Science Foundation under Grant CCR-8714565. The fourth author has been supported in part by the Office of Naval Research under Grant N0014-87-K-0129, by the National Science Foundation under Grant NSF-DCR-83-20085, by grants from the Digital Equipment Corporation and the IBM Corporation, and by a grant from the US-Israeli Binational Science Foundation.

Rights and permissions

Reprints and Permissions

About this article

Cite this article

Chazelle, B., Edelsbrunner, H., Guibas, L.J. et al. Algorithms for bichromatic line-segment problems and polyhedral terrains. Algorithmica 11, 116–132 (1994).

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI:

Key words

  • Computational geometry
  • Line-segment intersection
  • Segment trees
  • Lines in space
  • Polyhedral terrains
  • Deterministic and randomized algorithms