HomeGame DevelopmentSimulations-Enhanced-Simulations

🧪 Simulations-Enhanced-Simulations

Drag and rotate two convex polygons and watch the Separating Axis Theorem test every edge normal in real time: see exactly which axis proves the shapes apart, or the minimum-translation vector that pushes them out of overlap.

Game Development2DModerate60 FPS
simulations-enhanced-simulations ↗ Open standalone

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".

⚙ Under the hood

This simulation showcases advanced techniques for enhancing the realism and fidelity of simulations. It demonstrates how to incorporate features like procedural generation and dynamic environments.

Enhanced Simulations

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)