Abstract
This paper presents new algorithms for snap rounding an arrangement \({\mathcal{A}}\) of line segments in the plane. Snap rounding defines a set of hot pixels, which are unit squares centered on the integer grid points closest to the vertices of \({\mathcal{A}}\) . Snap rounding simplifies \({\mathcal{A}}\) by replacing every input segment by a piecewise linear curve connecting the centers of the hot pixels the segment intersects. Let ℋ be the set of all hot pixels, and for each h∈ℋ let is(h) be the number of segments with an intersection or endpoint inside h. If \({\mathcal{A}}\) contains n input segments, the running time of the first new algorithm is O(∑ h∈ℋ is(h)log n). This improves previous input- and output-sensitive algorithms by a factor of Θ(n) in the worst case. The second algorithm has an even better running time of O(∑ h∈ℋ ed(h)log n); here ed(h) is the description complexity of the crossing pattern in h, which may be substantially less than is(h) and is never greater.
Article PDF
Similar content being viewed by others
Avoid common mistakes on your manuscript.
References
Bentley, J.L., Ottmann, T.A.: Algorithms for reporting and counting geometric intersections. IEEE Trans. Comput. C-28(9), 643–647 (1979)
Brown, K.Q.: Comments on “Algorithms for reporting and counting geometric intersections”. IEEE Trans. Comput. C-30, 147–148 (1981)
Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 2nd edn. MIT Press, Cambridge (2001)
Cormode, G., Muthukrishnan, S.: The string edit distance matching problem with moves. In: Proc. 13th ACM-SIAM Sympos. Discrete Algorithms, pp. 667–676, 2002
de Berg, M., Halperin, D., Overmars, M.: An intersection-sensitive algorithm for snap rounding. Comput. Geom. Theory Appl. 36, 159–165 (2007)
de Berg, M., van Kreveld, M., Overmars, M., Schwarzkopf, O.: Computational Geometry: Algorithms and Applications, 2nd edn. Springer, Berlin (2000)
Driscoll, J.R., Sarnak, N., Sleator, D.D., Tarjan, R.E.: Making data structures persistent. J. Comput. Syst. Sci. 38, 86–124 (1989)
Estivill-Castro, V., Wood, D.: A survey of adaptive sorting algorithms. ACM Comput. Surv. 24, 441–476 (1992)
Goodrich, M., Guibas, L.J., Hershberger, J., Tanenbaum, P.: Snap rounding line segments efficiently in two and three dimensions. In: Proc. 13th Annu. ACM Sympos. Comput. Geom., pp. 284–293, 1997
Greene, D.H.: Integer line segment intersection (unpublished manuscript)
Guibas, L., Marimont, D.: Rounding arrangements dynamically. In: Proc. 11th Annu. ACM Sympos. Comput. Geom., pp. 190–199, 1995
Guibas, L.J., McCreight, E., Plass, M., Roberts, J.: A new representation for linear lists. In: Proc. 9th Annu. ACM Sympos. Theory Comput., pp. 49–60, 1977
Halperin, D.: Problem 1: Output sensitive algorithm for snap rounding, June 2005. Open Problem Session: 21st Annu. ACM Sympos. Comput. Geom.
Halperin, D., Packer, E.: Iterated snap rounding. Comput. Geom. Theory Appl. 23, 209–225 (2002)
Hobby, J.D.: Practical segment intersection with finite precision output. Comput. Geom. Theory Appl. 13(4), 199–214 (1999)
Huddleston, S., Mehlhorn, K.: A new data structure for representing sorted lists. Acta Inform. 17, 157–184 (1982)
Hwang, F.K., Lin, S.: A simple algorithm for merging two disjoint linearly ordered sets. SIAM J. Comput. 1(1), 31–39 (1972)
Packer, E.: Iterated snap rounding with bounded drift. In: Proc. 22nd Annu. ACM Sympos. Comput. Geom., pp. 367–376, 2006
Sharir, M., Agarwal, P.K.: Davenport–Schinzel Sequences and Their Geometric Applications. Cambridge University Press, New York (1995)
Tichy, W.F.: The string-to-string correction problem with block moves. ACM Trans. Comput. Syst. 2(4), 309–321 (1984)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Hershberger, J. Improved Output-Sensitive Snap Rounding. Discrete Comput Geom 39, 298–318 (2008). https://doi.org/10.1007/s00454-007-9015-0
Received:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00454-007-9015-0