⭐ View on GitHub

G / click — switch shapes    K / L — change distance    R — toggle rotation

Unified EPA — Distance & Penetration Detection

A unified implementation of the Expanding Polytope Algorithm (EPA) that computes both the separation distance and penetration depth between two convex shapes defined by their support mappings — no GJK required as a separate phase.

What the visualization shows

The green dots mark the closest points on each shape, connected by a green line. When the shapes are separated, this line represents the shortest distance between them. When the shapes collide (shown translucent), the line shows the minimum direction and distance the shapes have to be moved apart to be separated again.