Collision
Collision detection and intersection demos.
Line Intersection
Drag line handles to test collision. Red dots show line intersections.
Circle Collision
Circles collide when the distance between their centres is less than the sum of the radiuses.
Drag circles to test collision.
Rectangle Collision
Rectangles with no rotation (axis aligned) will collide if there is no gap between any of the 4 sides of both rectangles.
Drag corners to test collision.
Polygon Collision
Separating Axis Theorem can detect collision between any two convex polygons.
Drag corners to test collision.