The Separating Axis Theorem (SAT) can be used to determine if two arbitrary shapes intersect. Both shapes being tested must be convex. The SAT works by looking for at least one axis of separation between two objects. If no axis of separation exists, the objects are colliding. An axis of separation can be represented by any arbitrary plane:
The first step in the SAT is to find an axis that we want to test for separation. In the example image above, the two oriented bounding boxes can havewo possible axes of separation. The X axis (1, 0) or the Y axis (0, 1) can separate these boxes.
Once we have figured out the axis of potential separation, we project both shapes onto the axis being tested. This projection results in a set of points. The minimum and maximum points of this projection create an Interval. An interval is like a line; in the above image you can see four intervals, one on the X axis for both objects and one on the Y axis for both objects: