# Physics with Rapier **Track:** Simulation & Complexity — Advanced Creative Coding — proposed (50) **Framework / surface:** three.js **Level:** Hard **Prerequisites:** 3D Coordinate Space & Meshes, Forces & Acceleration **In one line:** Rigid bodies, joints/constraints, instanced physics in the browser. ## Theory, aesthetics & inspiration Rapier is a rigid-body physics engine from Dimforge, written in Rust and compiled to WebAssembly for the browser. It integrates Newtonian motion for solid bodies and resolves contacts and joints through a constraint solver, so collisions, friction, and articulated linkages behave consistently across machines — its determinism is a design goal. Joints and constraints — revolute hinges, prismatic sliders, fixed welds — bind bodies into mechanisms, while instancing lets thousands of objects share geometry and tumble at once. The aesthetic is the satisfying physicality of mass and contact: stacks that topple, chains that swing, debris that settles into convincing rest under gravity.