# A Faster Algorithm for Computing Motorcycle Graphs

- 195 Downloads

## Abstract

We present a new algorithm for computing motorcycle graphs that runs in \(O(n^{4/3+\varepsilon })\) time for any \(\varepsilon >0\), improving on all previously known algorithms. The main application of this result is to computing the straight skeleton of a polygon. It allows us to compute the straight skeleton of a non-degenerate polygon with \(h\) holes in \(O(n \sqrt{h+1} \log ^2 n+n^{4/3+\varepsilon })\) expected time. If all input coordinates are \(O(\log n)\)-bit rational numbers, we can compute the straight skeleton of a (possibly degenerate) polygon with \(h\) holes in \(O(n \sqrt{h+1}\log ^3 n)\) expected time. In particular, it means that we can compute the straight skeleton of a simple polygon in \(O(n\log ^3n)\) expected time if all input coordinates are \(O(\log n)\)-bit rationals, while all previously known algorithms have worst-case running time \(\omega (n^{3/2})\).

### Keywords

Algorithms design and analysis Motorcycle graph Straight skeleton Medial axis Polygon### Mathematics Subject Classification

68U05 65D18 68Q25## Notes

### Acknowledgments

Lie Yan was supported by KAUST base funding. We thank the anonymous referees for their helpful comments.

### References

- 1.Agarwal, P., Erickson, J.: Geometric range searching and its relatives. Advances in Discrete and Computational Geometry, vol. 23, pp. 1–56. American Mathematical Society, Providence, RI (1998)Google Scholar
- 2.Agarwal, P., Matoušek, J.: Ray shooting and parametric search. SIAM J. Comput.
**22**(4), 794–806 (1993)MathSciNetCrossRefMATHGoogle Scholar - 3.Agarwal, P., Sharir, M.: Applications of a new space-partitioning technique. Discrete Comput. Geom.
**9**(1), 11–38 (1993)MathSciNetCrossRefMATHGoogle Scholar - 4.Agarwal, P., Sharir, M.: Ray shooting amidst convex polygons in 2D. J. Algorithms
**21**(3), 508–519 (1996)MathSciNetCrossRefMATHGoogle Scholar - 5.Aichholzer, O., Aurenhammer, F., Alberts, D., Gärtner, B.: A novel type of skeleton for polygons. J. Univers. Comput. Sci.
**1**(12), 752–761 (1995)Google Scholar - 6.Arge, L., Brodal, G.S., Georgiadis, L.: Improved dynamic planar point location. In: Proceedings of 47th Symposium on Foundations of Computer Science, pp. 305–314 (2006)Google Scholar
- 7.Barequet, G., Goodrich, M., Levi-Steiner, A., Steiner, D.: Straight-skeleton based contour interpolation. In: Proceedings of 14th ACM-SIAM Symposium on Discrete Algorithms, pp. 119–127 (2003)Google Scholar
- 8.Buchin, K., Mulzer, W.: Delaunay triangulations in o(sort( n)) time and more. J. ACM
**58**(2), 6 (2011)MathSciNetCrossRefGoogle Scholar - 9.Burnikel, C., Fleischer, R., Mehlhorn, K., Schirra, S.: A strong and easily computable separation bound for arithmetic expressions involving square roots. In: Proceedings of 8th ACM-SIAM Symposium on Discrete Algorithms pp. 702–709 (1997)Google Scholar
- 10.Cacciola, F.: A CGAL implementation of the straight skeleton of a simple 2D polygon with holes. In: 2nd CGAL User Workshop (2004). https://www.cgal.org/UserWorkshop/2004straight_skeleton.pdf. Accessed 21 Aug 2014
- 11.Chan, T.: Optimal partition trees. Discrete Comput. Geom.
**47**(4), 661–690 (2012)MathSciNetCrossRefMATHGoogle Scholar - 12.Chan, T., Patrascu, M.: Transdichotomous results in computational geometry, I: point location in sublogarithmic time. SIAM J. Comput.
**39**(2), 703–729 (2009)MathSciNetCrossRefMATHGoogle Scholar - 13.Chazelle, B., Edelsbrunner, H., Grigni, M., Guibas, L., Hershberger, J., Sharir, M., Snoeyink, J.: Ray shooting in polygons using geodesic triangulations. Algorithmica
**12**(1), 54–68 (1994)MathSciNetCrossRefMATHGoogle Scholar - 14.Cheng, S.-W., Janardan, R.: New results on dynamic planar point location. SIAM J. Comput.
**21**(5), 972–999 (1992)MathSciNetCrossRefMATHGoogle Scholar - 15.Cheng, S.-W., Vigneron, A.: Motorcycle graphs and straight skeletons. Algorithmica
**47**(2), 159–182 (2007)MathSciNetCrossRefMATHGoogle Scholar - 16.Cloppet, F., Oliva, J., Stamon, G.: Angular bisector network, a simplified generalized Voronoi diagram: application to processing complex intersections in biomedical images. IEEE Trans. Pattern Anal. Mach. Intell.
**22**(1), 120–128 (2000)CrossRefGoogle Scholar - 17.Cormen, T., Leiserson, C., Rivest, R., Stein, C.: Introduction to Algorithms. The MIT Press, Cambridge (2009)MATHGoogle Scholar
- 18.Eppstein, D., Erickson, J.: Raising roofs, crashing cycles, and playing pool: applications of a data structure for finding pairwise interactions. Discrete Comput. Geom.
**22**(4), 569–592 (1999)MathSciNetCrossRefMATHGoogle Scholar - 19.Eppstein, D., Goodrich, M., Kim, E., Tamstorf, R.: Motorcycle graphs: canonical quad mesh partitioning. Comput. Graph. Forum
**27**(5), 1477–1486 (2008)CrossRefGoogle Scholar - 20.Erickson, J.: Crashing motorcycles efficiently. http://web.engr.illinois.edu/~jeffe/open/cycles.html. Accessed 21 Aug 2014 (1998)
- 21.Felkel, P., Obdržálek, Š.: Straight skeleton implementation. In: Proceedings of 14th Spring Conference on Computer Graphics, pp 210–218 (1998)Google Scholar
- 22.Giyora, Y., Kaplan, H.: Optimal dynamic vertical ray shooting in rectilinear planar subdivisions. In: Proceedings of 18th ACM-SIAM Symposium on Discrete Algorithms, pp. 19–28 (2007)Google Scholar
- 23.Goodrich, M., Tamassia, R.: Dynamic ray shooting and shortest paths in planar subdivisions via balanced geodesic triangulations. J. Algorithms
**23**(1), 51–73 (1997)MathSciNetCrossRefMATHGoogle Scholar - 24.Hershberger, J., Suri, S.: A pedestrian approach to ray shooting: shoot a ray, take a walk. J. Algorithms
**18**(3), 403–431 (1995)MathSciNetCrossRefMATHGoogle Scholar - 25.Huber, S.: Computing straight skeletons and motorcycle graphs: theory and practice. PhD Thesis, Universität Salzburg, Austria (2011). http://www.buchhandel.de/detailansicht.aspx?isbn=9783844009385
- 26.Huber, S., Held, M.: Motorcycle graphs: stochastic properties motivate an efficient yet simple implementation. ACM J. Exp. Algorithmics
**16**, Art. No. 1.3 (2011)Google Scholar - 27.Huber, S., Held, M.: A fast straight-skeleton algorithm based on generalized motorcycle graphs. Int. J. Comput. Geom. Appl.
**22**(5), 471–499 (2012)MathSciNetCrossRefMATHGoogle Scholar - 28.Kelly, T., Wonka, P.: Interactive architectural modeling with procedural extrusions. ACM Trans. Graph.
**30**(2), 14:1–14:15 (2011)CrossRefGoogle Scholar - 29.Laycock, R., Day, A.: Automatically generating large urban environments based on the footprint data of buildings. In: Proceedings of 8th ACM Symposium on Solid Modeling and Applications, pp. 346–351 (2003)Google Scholar
- 30.Matoušek, J.: Efficient partition trees. Discrete Comput. Geom.
**8**, 315–334 (1992)MathSciNetCrossRefMATHGoogle Scholar - 31.Oliva, J., Perrin, M., Coquillart, S.: 3D reconstruction of complex polyhedral shapes from contours using a simplified generalized Voronoi diagram. Comput. Graph. Forum
**15**(3), 397–408 (1996)CrossRefGoogle Scholar - 32.Palfrader, P., Held, M., Huber, S.: On computing straight skeletons by means of kinetic triangulations. In: Proceedings of 20th European Symposium on Algorithms, pp. 766–777 (2012)Google Scholar
- 33.Preparata, F., Shamos, M.: Computational Geometry: An Introduction. Springer, Berlin (1985)CrossRefGoogle Scholar
- 34.von Peschka, G.: Kotirte Ebenen. Buschak & Irrgang, Brünn (1877)Google Scholar