Classical mechanics, body dynamics and materials physics in real time. From car suspension to SPH fluid and the chaos of a double pendulum.
Open a simulation — it runs right in your browser
Articles and tutorials about the algorithms in this category
Collision forces, rigid bodies, and material physics — in real time
Physics and mechanics simulations cover the full breadth of classical dynamics. Rigid-body collisions are resolved with impulse-based physics engines (Cannon-es), spring-mass cloth responds to gravity and wind, and SPH fluid particles compute pressure and viscosity every frame. Each simulation exposes a different facet of Newton's laws, from elastic billiard-ball collisions to the fracture patterns of a Voronoi solid.
Interacting with the parameters — friction, restitution, gravity strength — reveals the sensitivity of physical systems to initial conditions and material properties. These models are the same mathematical foundations used in game engines, engineering CAD software, and industrial crash-test simulations, making them an excellent introduction to applied computational physics.
From an engineering perspective, each simulation is a real-time numerical solver running at 60 fps inside WebGL or Canvas 2D. The Cannon-es pipeline computes contact manifolds, resolves impulse constraints, and integrates velocities each frame — the same architecture used in commercial game engines and robotics simulators. Studying these interactive models is an excellent entry point into game-engine physics programming, rigid-body dynamics, and computational fluid mechanics.
Topics and algorithms you'll explore in this category
5 questions — mechanics, momentum, waves, and more
Common questions about this simulation category