Shape A — draggable Shape B — fixed Colliding Separating / MTV axis
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

Separating Axis Theorem (SAT) Collision Detector

Every convex-shape collision test in a game engine ultimately reduces to the same question: is there some direction along which the two shapes' shadows don't overlap? The Separating Axis Theorem answers it by checking a short, well-defined list of candidate axes — one perpendicular to every edge of both polygons — and projecting both shapes onto each one. This simulator generates two random convex polygons, lets you drag one and rotate both, and re-runs the full SAT test every frame: it reports how many axes had to be checked before an answer was found, which axis separated the shapes (or, once they overlap, the minimum translation vector needed to push them apart), and visualizes every candidate axis so the geometry behind the algorithm is never hidden behind a black-box "true/false".