Physics & Mechanics

Classical mechanics, body dynamics and materials physics in real time. From car suspension to SPH fluid and the chaos of a double pendulum.

10+ simulations Three.js · Cannon-es SPH · Spring-Mass · RK4

Category Simulations

Open a simulation — it runs right in your browser

🚗
Popular ★★★ Advanced
Car Physics
Realistic driving with suspension (Cannon-es RaycastVehicle), drift, nitro and particle effects. WASD control over rough terrain.
Three.js Cannon-es Particles
💧
★★★ Advanced
SPH Fluid
Smoothed Particle Hydrodynamics: pressure, viscosity, gravity, wall bouncing. Colour by pressure.
Three.js SPH InstancedMesh
🧣
★★☆ Moderate
Cloth Simulation
Spring-mass model with wind, gravity and sphere collision. Drag vertices with the mouse — the cloth reacts in real time.
Three.js Spring-Mass Mouse drag
🌀
★★☆ Moderate
Double Pendulum
Up to 120 pendulums simultaneously — chaos arises from microscopic differences in initial conditions. Numerical integration using the RK4 method.
Three.js RK4 Chaos
🌊
★★☆ Moderate
Interactive Ocean
Gerstner waves in a GLSL shader: foam, moonlight reflection, Fresnel effect. Presets — calm, storm, ripple, tsunami. Throw a stone with a click.
GLSL Gerstner Fresnel
★☆☆ Easy
Sand Automaton
Cellular automaton with sand, water, fire, wood, acid and smoke. Draw with the mouse — watch substance reactions.
Canvas 2D Cellular Automaton
🌈
New ★★☆ Moderate
Atmospheric Optics
Rayleigh scattering, rainbow arcs, 22° ice-crystal halo and ray-tracing inside a single water droplet. Sun angle controls the sky colour.
Canvas 2D Rayleigh Rainbow Optics
⚙️
New ★★☆ Moderate
Mechanisms
Gear trains, crank-slider, chain drives and four-bar linkages. Adjust gear ratios and watch torque transfer through each mechanism.
Canvas 2D Kinematics Gears Rigid Body
🎱
New ★★☆ Moderate
Billiards Physics
Full billiards table with elastic collisions, topspin and backspin. Rack 15 balls, aim with the cue, adjust friction and restitution.
Canvas 2D Collisions Spin Rigid Body
🧱
New ★★☆ Moderate
Fracture Simulation
Voronoi destruction of glass, concrete, ice and more. Click to shatter, adjust cell count, gravity and restitution. Real rigid-body fragments.
Canvas 2D Voronoi Rigid Body Fracture
🧲
★★★ Advanced New
Ising Model
2D Ising ferromagnet on a square lattice via Metropolis-Hastings Monte Carlo. Adjust temperature, coupling J and field B. Watch spontaneous magnetisation and phase transitions live.
Monte Carlo Metropolis Phase Transition
🔥
★★☆ Moderate New
Fire & Smoke
Cellular automaton with fire, smoke, ember, ash, wood, water and wall cells. Paint materials with the brush, set wind and watch combustion physics play out cell by cell.
Cellular Automaton Thermodynamics Canvas 2D
New ★★☆ Moderate
Electric Field Lines
Interactive point charges with live field line tracing and equipotential contours via Coulomb's law. Drag charges to move them, right-click to remove. Cursor shows live potential.
Coulomb's Law Electrostatics Canvas 2D
🔵
★☆☆ Easy
Particle Diffusion
Particle diffusion and osmosis in action. Watch Fick's second law as molecules spread from high to low concentration. Adjust temperature and particle count to explore entropy live.
Fick's Law Entropy Canvas 2D
🧲
★☆☆ Easy
Magnetic Field Lines
Interactive magnetic field line visualizer. Place north and south poles on the canvas — field lines and flux density update in real time via Coulomb's law.
Electromagnetism Field Lines Canvas 2D
🕰️
★☆☆ Easy
Pendulum Wave
Pendulum wave machine simulation. Pendulums of different lengths synchronise into mesmerising wave patterns. Adjust count, length and gravity to explore coupled oscillation.
Pendulum Oscillation Canvas 2D
🔗
★★☆ Moderate
Spring-Mass Network
Interactive spring-mass system with Verlet integration. Drag masses, adjust stiffness and damping — watch wave propagation and normal modes appear across the lattice.
Verlet Wave Propagation Canvas 2D
💥
New ★★☆ Moderate
Ballistics & Drag
Projectile motion with realistic air resistance. Adjust launch angle, initial speed and drag coefficient — see range and trajectory change in real time.
Kinematics Drag Canvas 2D
🔊
New ★☆☆ Beginner
Doppler Effect
Moving source emits sound waves — watch wavefront compression and stretching visualised in real time. Adjust source velocity and observe frequency shift.
Waves Sound Canvas 2D
🌀
New ★★★ Advanced
Gyroscope Precession
3D spinning gyroscope demonstrating precession and nutation. Euler's rotation equations solved in real time with Three.js.
Rotation Euler Equations Three.js
New ★★☆ Moderate
Magnus Effect
Spinning ball curves through the air — visualise the Magnus force arising from pressure differential around a rotating sphere (football, baseball, golf ball).
Fluid Dynamics Rotation Canvas 2D
💡
New ★★☆ Moderate
Photoelectric Effect
Shine photons on a metal surface and watch electrons eject. Adjust photon frequency and intensity — explore threshold frequency and Einstein's quantum explanation.
Quantum Photons Canvas 2D
🌡️
New ★☆☆ Beginner
Thermal Expansion
Heat a solid or liquid and watch it expand. Visualise linear, area and volumetric expansion coefficients for different materials.
Thermodynamics Materials Canvas 2D
⚛️
New ★★★ Advanced
Nuclear Fission Chain
Trigger a chain reaction — neutrons split U-235 nuclei, releasing energy and more neutrons. Control enrichment and geometry to reach criticality.
Nuclear Chain Reaction Canvas 2D
☢️
New ★☆☆ Beginner
Radioactive Decay
Watch a population of unstable nuclei decay over time. Adjust half-life and observe exponential decay law and activity curves.
Nuclear Exponential Decay Canvas 2D
🧬
★☆☆ Beginner
Conway's Game of Life
Conway's cellular automaton: 23/3 birth-survival rule on an infinite grid. Discover gliders, oscillators and spaceships — emergent complexity from two rules.
Cellular Automaton Emergence
🌉
New ★★☆ Moderate
Bridge Designer
FEM truss bridge analysis: Warren, Pratt and Howe topologies. Members colour-coded by tension (blue) and compression (red). Deformation magnified 50× with safety factor calculation.
Canvas 2D FEM Structural Analysis Truss
🎵
New ★★☆ Moderate
Driven Resonance
A mass-spring-damper oscillator driven by F₀·cos(ωt). Sweep the driving frequency through ω₀ to watch the amplitude peak. Explore Q factor, phase lag and the Bode-style resonance curve.
Resonance Forced Oscillations Q Factor
💎
★★☆ Moderate New
Crystal Structures
Rotate and explore BCC, FCC, HCP, Diamond, NaCl and Simple Cubic crystal lattices in 3D. See coordination numbers, packing efficiency, and toggle the unit cell box or 2×2×2 supercell.
BCC / FCC / HCP Crystallography Packing Efficiency
⛓️
Ready★★☆ Moderate New
Catenary
Drag anchor points to reshape a hanging chain and see the exact catenary y = a·cosh(x/a) update live. Compare with parabola approximation and visualise tension vectors along the cable.
Hyperbolic Cosh Hanging Chain Canvas 2D
💧
New ★★☆ Moderate
Viscoelastic Fluid
Explore rheology with Maxwell, Kelvin-Voigt and Standard Linear Solid models. Drag an interactive spring-dashpot blob; tune G₀ and η; watch stress relaxation, creep and dynamic moduli G′/G″ in real time.
Rheology Maxwell Model Complex Modulus

Learning Resources

Articles and tutorials about the algorithms in this category

Article SPH: Fluid on the GPU Poly6, Spiky and Viscosity kernels. Tait pressure equation. Spatial hashing for neighbour search. Article Verlet, Leapfrog & RK4: Integrators Overview Why Euler is unstable. Symplectic integrators for physics simulations. Article Cloth Simulation via Verlet Integration Particles + springs. Verlet integration. Collisions and cloth self-intersection.
All articles →

About Physics & Mechanics Simulations

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.

Key Concepts

Topics and algorithms you'll explore in this category

Newton's LawsF = ma governs every rigid body and particle
SPH FluidSmoothed Particle Hydrodynamics for real-time liquids
Verlet / RK4Stable numerical integrators for motion equations
Cannon-esBrowser physics engine for collisions and constraints
Spring-MassCloth and soft bodies via spring networks
Rigid BodyImpulse-based collision resolution in 3D

⚙️ Test Your Physics Knowledge

5 questions — mechanics, momentum, waves, and more

Frequently Asked Questions

Common questions about this simulation category

What physics engine powers these simulations?
Most rigid-body simulations use Cannon-es, a WebAssembly-compatible physics engine built on Ammo.js principles. SPH fluid runs on a custom solver, while cloth uses Verlet integration on the CPU.
Can I adjust gravity and friction in real time?
Yes — every simulation exposes its key parameters as live sliders. Car Physics lets you tune surface friction and engine torque; the Cloth simulation provides wind strength and gravity multiplier controls.
How accurate are these compared to real-world physics?
The formulations (Navier-Stokes for SPH, Newton-Euler for rigid bodies) are identical to those used in professional engineering tools. Results are physically plausible and excellent for building intuition, though not calibrated to exact SI units.

Other Categories