Abstract
Collision detection is a fundamental component of physics engines, robotic motion planning, and computer graphics. While the Gilbert-Johnson-Keerthi (GJK) algorithm has served as the industry standard for the "narrow phase" of collision detection for decades, its development has largely been confined to the realm of computational geometry. This paper presents a novel reframing of GJK as a specific instance of the Frank-Wolfe optimization method. By adopting this optimization perspective, we introduce Nesterov acceleration to the collision detection process. Our proposed Nesterov-accelerated GJK reduces iteration counts and achieves up to a 2x speedup in computation time, particularly in high-stakes scenarios where objects are in close proximity.
Introduction
In modern simulation environments, collision detection is typically divided into two distinct stages: the broad phase, which uses simple bounding volumes to quickly discard distant pairs of objects, and the narrow phase, which performs precise distance calculations for convex shapes in close proximity. For the narrow phase, the GJK algorithm is the dominant choice due to its efficiency and versatility.
However, GJK's traditional geometric interpretation has arguably reached a plateau in terms of performance improvements. This research argues that by viewing collision detection as a convex optimization problem—specifically the task of finding the minimum distance between two convex sets—we can leverage advanced acceleration techniques from the field of mathematical optimization that have previously remained untapped in geometric computing.
Methodology: From Geometry to Optimization
Recasting GJK as Frank-Wolfe
The core theoretical contribution of this work is the proof that the GJK algorithm is mathematically equivalent to a "fully-corrective" variant of the Frank-Wolfe (FW) algorithm. Frank-Wolfe is a first-order optimization method that iteratively moves toward a "support point" (the point in a set furthest in a given direction). This realization bridges the gap between geometric search and iterative optimization.
Nesterov Acceleration and Momentum
Standard GJK determines its search direction based solely on the current estimate, which can lead to inefficient "zig-zagging" as the algorithm approaches the optimal solution. By applying Nesterov momentum, we introduce a weighted average of previous gradients to smooth the trajectory toward the solution. This momentum allows the algorithm to "accelerate" through the search space.
Addressing Non-Strict Convexity
One challenge with standard acceleration is its performance on non-strictly convex shapes, such as cubes or meshes with flat faces. To prevent the algorithm from stalling or overshooting when sliding along these flat surfaces, we implement a normalization heuristic for the support direction. This ensures robust performance across a diverse range of geometric primitives.
The Accelerated GJK Algorithm
The resulting "Algorithm 7" integrates these momentum terms while preserving the efficient "simplex" bookkeeping (managing points, lines, triangles, and tetrahedra) that makes GJK computationally lightweight. This hybrid approach maintains the low memory footprint of GJK while gaining the convergence speed of accelerated optimization.
Experimental Evaluation
The performance of the Nesterov-accelerated GJK was evaluated against the standard GJK and other recent variants using two primary benchmarks:
- Ellipsoids: A controlled dataset of 1,000 random pairs of strictly convex shapes. Researchers varied the signed distance (from -0.1m to 1m) to analyze performance during the transition from intersection to separation.
- ShapeNet Meshes: A real-world dataset comprising 1.8k meshes from 10 categories. These meshes, converted to their convex hulls, tested the algorithm on non-strictly convex geometry with vertex counts ranging from 33 to 2,500.
Key Results and Insights
Performance Gains
The accelerated algorithm demonstrated significant efficiency improvements:
- Computation Time: Achieved up to a 2x reduction in total computation time compared to vanilla GJK.
- Iteration Efficiency: In close-proximity ellipsoid tests, the average number of iterations required for convergence dropped from approximately 16 to 7.
- Mesh Complexity: On the ShapeNet benchmark, the accelerated version consistently outperformed the standard version. For a complex mesh with 2,500 vertices, distance computation time was reduced from 4.1μs to 2.7μs.
The Proximity Paradox
An interesting finding of the study is that acceleration is most effective when objects are near each other. When objects are very far apart, momentum can cause the search to overshoot, potentially increasing the iteration count. However, in practical physics engines, the broad phase filters out these distant cases. Therefore, the Nesterov-accelerated GJK excels exactly where the narrow phase is most computationally demanding: when objects are touching or nearly touching.
Comparison with Existing Methods
The study also compared the proposed method against NESMINO, a recent attempt at GJK acceleration. The results indicated that the Nesterov-accelerated GJK significantly outperformed NESMINO, which in some practical tests was found to be even slower than the original vanilla GJK.
Conclusion and Future Work
By reframing a classic geometric problem through the lens of convex optimization, this research provides a significant performance boost to a core component of physical simulation. While the current implementation is highly effective for the narrow phase, future work could explore "restart strategies" for the momentum term to improve robustness for distant objects. Additionally, while the algorithm currently requires convex shapes, its integration with advanced convex decomposition methods could further extend its utility to complex, non-convex geometries in real-time applications.
Summary updated