GJK
The Gilbert–Johnson–Keerthi (GJK) distance algorithm is a geometric method for detecting collision and measuring the minimum distance between two convex shapes. It is widely used in computational geometry and real-time physics simulation due to its efficiency with convex objects.
The algorithm operates in the Minkowski difference of the two shapes. In each iteration, it selects a
If the origin lies inside the current simplex, the two shapes intersect. If not, the algorithm converges
GJK is primarily a collision-detection algorithm, but a distance variant yields the minimum separation. When intersection
Historically, GJK was introduced independently by Gilbert, Johnson, and Keerthi in the 1980s. It remains a foundational