Abstract
A common geometric problem in computer graphics and geographic information systems is to compute the arrangement of a set of n segments that can be colored red and blue so that there are no red/red or blue/blue crossings. We give a sweep algorithm that uses the minimum arithmetic precision and runs in optimal O(n log n + k) time and O(n) space to output an arrangement with k vertices, or O(n log n) time to determine k. Our initial implementation in Java can be found at http://www.cs.unc.edu/~snoeyink/demos/rbseg.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Ivan J. Balaban. An optimal algorithm for finding segment intersections. In Proc. 11th Annu. ACM Sympos. Comput. Geom., pages 211–219, 1995.
U. Bartuschka, K. Mehlhorn, and S. Näher. A robust and efficient implementation of a sweep line algorithm for the straight line segment intersection problem. In Proc. Workshop on Algorithm Engineering, pages 124–135, 1997.
J. L. Bentley and T. A. Ottmann. Algorithms for reporting and counting geometric intersections. IEEE Trans. Comput., C-28(9):643–647, September 1979.
J. F. Blinn. A trip down the graphics pipeline: Line clipping. IEEE Comput. Graph. Appl., 11(1):98–105, 1991.
J.-D. Boissonnat and J. Snoeyink. Efficient algorithms for line and curve segment intersection using restricted predicates. In Proc. 15th Annu. ACM Sympos. Comput. Geom., pages 370–379, 1999.
Jean-Daniel Boissonnat and Franco P. Preparata. Robust plane sweep for intersecting segments. SIAM J. Comp., 29(5):1401–1421, 2000.
Andreas Brinkmann and Klaus Hinrichs. Implementing exact line segment intersection in map overlay. In Proc. 8th Intl. Symp. Spatial Data Handling, pages 569–579. International Geographical Union, 1998.
T. M. Chan. A simple trapezoid sweep algorithm for reporting red/blue segment intersections. In Proc. 6th Canad. Conf. Comput. Geom., pages 263–268, 1994.
Bernard Chazelle. Reporting and counting segment intersections. J. Comput. Syst. Sci., 32:156–182, 1986.
Bernard Chazelle and H. Edelsbrunner. An optimal algorithm for intersecting line segments in the plane. J. ACM, 39(1):1–54, 1992.
Bernard Chazelle, H. Edelsbrunner, Leonidas J. Guibas, and Micha Sharir. Algorithms for bichromatic line segment problems and polyhedral terrains. Algorithmica, 11:116–132, 1994.
Olivier Devillers and Andreas Fabri. Scalable algorithms for bichromatic line segment intersection problems on coarse grained multicomputers. Internat. J. Comput. Geom. Appl., 6:487–506, 1996.
J. R. Driscoll, N. Sarnak, D. D. Sleator, and R. E. Tarjan. Making data structures persistent. J. Comput. Syst. Sci., 38:86–124, 1989.
M. Goodrich, L. J. Guibas, J. Hershberger, and P. Tanenbaum. Snap rounding line segments efficiently in two and three dimensions. In Proc. 13th Annu. ACM Sympos. Comput. Geom., pages 284–293, 1997.
Michael T. Goodrich and Roberto Tamassia. Data Structures and Algorithms in Java. John Wiley & Sons, New York, NY, 1998.
Leonidas Guibas and David Marimont. Rounding arrangements dynamically. Internat. J. Comput. Geom. Appl., 8:157–176, 1998.
J. D. Hobby. Practical segment intersection with finite precision output. Comput. Geom. Theory Appl., 13(4):199–214, October 1999.
H. G. Mairson and J. Stolfi. Reporting and counting intersections between two sets of line segments. In R. A. Earnshaw, editor, Theoretical Foundations of Computer Graphics and CAD, volume 40 of NATO ASI Series F, pages 307–325. Springer-Verlag, Berlin, West Germany, 1988.
Victor J. Milenkovic. Practical methods for set operations on polygons using exact arithmetic. In Proc. 7th Canad. Conf. Comput. Geom., pages 55–60, 1995.
D. M. Mount. Storing the subdivision of a polyhedral surface. Discrete Comput. Geom., 2:153–174, 1987.
L. Palazzi and J. Snoeyink. Counting and reporting red/blue segment intersections. CVGIP: Graph. Models Image Process., 56(4):304–311, 1994.
D. D. Sleator and R. E. Tarjan. A data structure for dynamic trees. J. Comput. Syst. Sci., 26(3):362–381, 1983.
R. B. Tilove and A. A. G. Requicha. Closure of boolean operations on geometric entities. Comput. Aided Design, 12:219–220, 1980.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Mantler, A., Snoeyink, J. (2001). Intersecting Red and Blue Line Segments in Optimal Time and Precision. In: Akiyama, J., Kano, M., Urabe, M. (eds) Discrete and Computational Geometry. JCDCG 2000. Lecture Notes in Computer Science, vol 2098. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-47738-1_23
Download citation
DOI: https://doi.org/10.1007/3-540-47738-1_23
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-42306-5
Online ISBN: 978-3-540-47738-9
eBook Packages: Springer Book Archive