Physics 2D
Coursework that grew into the 3D physics of my bachelor’s thesis on Steel Engine: an own physics engine and a full game on top of it, inspired by Elasto Mania and Half-Life 2. The 2005 coursework, “Collision Detection”, supervised by Prof. Paulis Ķikusts, set the goal: a hundred rigid polygon bodies in real time that never pass through each other, even at a low frame rate. It surveyed how games had done it — bounding boxes in Doom and Mario, grid hashing in Warcraft, polygons in Quake and Havok — and added methods of my own: the cylinder method, which treats a moving, rotating body in 2D plus time as a twisted cylinder so a collision inside a time step is found exactly, a sequential collision algorithm, and the moment of inertia of an arbitrary polygon.
Video
Pictures
From the coursework: a star that moves and rotates, drawn in space plus time, becomes a twisted cylinder. Collision detection becomes finding where such cylinders intersect.