Abstract
This paper presents a robust and efficient algorithm for computing generalized motorcycle graphs, a fundamental structure for straight skeletons in computational geometry. By leveraging kinetic triangulations to track moving particles, we achieve a practical $O(n \log n)$ runtime. Our approach significantly outperforms previous state-of-the-art implementations, particularly on non-uniformly distributed datasets, by maintaining consistent performance across various data characteristics.
Introduction
In computational geometry, a motorcycle graph is formed by "motorcycles" (points) moving at constant velocities from initial positions. Each motorcycle leaves a trace, and it "crashes" and stops upon hitting another motorcycle's trace. These graphs are essential for computing straight skeletons, which find applications in 3D modeling, GIS, and font design.
The challenge for existing algorithms has been handling non-uniform point distributions, where performance could degrade from $O(n \log n)$ to $O(n^2 \log n)$. This work introduces a generalized solution capable of handling walls, secondary launches, and non-uniform data with high efficiency.
Methodology
The proposed algorithm operates in two primary phases:
1. Kinetic Triangulation within the Convex Hull
The algorithm initializes a constrained Delaunay triangulation of the starting points and walls. As motorcycles move, the triangulation is treated as "kinetic." * Crash Detection: A crash is identified when a triangle in the mesh collapses (its area becomes zero). * Topology Maintenance: To maintain a valid triangulation during movement, "edge flips" are performed as needed.
2. Plane Sweep outside the Convex Hull
Once motorcycles exit the convex hull of the input, the algorithm transitions to a generalized plane sweep. The sweep front is defined by an expanding version of the convex hull itself.
The paper also investigates Steiner Triangulations, where additional points are added to align with motorcycle tracks to potentially eliminate flip events. While theoretically promising, finding optimal Steiner points remains a challenge as crash locations are not known a priori.
Experimental Results
The algorithm was evaluated using a C++ implementation on thousands of datasets, including real-world and synthetic "worst-case" scenarios. It was benchmarked against Moca, the previous leading implementation.
Key findings include:
- Performance: The new algorithm is approximately 32% faster than Moca on average.
- Scalability: It maintains $O(n \log n)$ behavior even on dense or non-uniform data, handling up to 100,000 motorcycles. The runtime is consistently modeled as $c \cdot 10^{-6} \cdot n \log n$ seconds, with $c \le 4$.
- Flip Event Frequency: While the theoretical worst-case for flips is $O(n^3)$, empirical results show that the number of flips is typically linear ($f \le 5n$), contributing to the observed efficiency.
Conclusion
By using triangulation as a local "sensor" for crash events, this method provides a robust and scalable solution for computing motorcycle graphs. Future work will focus on optimizing Steiner point placement and improving numerical stability without the significant overhead of high-precision arithmetic libraries.
Summary updated