Skip to content
DAdhruuv.me / lab

/lab 7 experiments all client-side

Live experiments.

Small, self-contained simulations: real numerical methods and physics, integrated frame by frame in your browser. Each one is interactive. Updated occasionally.

012D finite-difference PDE solver

Wave Equation

The classical wave equation ∂²u/∂t² = c²∇²u integrated on a grid with a leapfrog scheme. Click or drag to drop a disturbance and watch it propagate, reflect off the walls, and interfere with itself.

numerical methodsPDEcanvasOpen ↗
02Position-based dynamics + constraints

Verlet Cloth

A grid of point masses joined by distance constraints, integrated with Verlet integration and relaxed over several constraint passes per frame. Drag to push the cloth around; drag hard and it tears.

physicsconstraintscanvasOpen ↗
03Velocity-Verlet gravitational integration

N-Body Gravity

Point masses under mutual Newtonian gravity, integrated with a symplectic velocity-Verlet step so orbits stay stable instead of spiralling from numerical drift. Starts as a binary; click to fling in more bodies.

physicsn-bodycanvasOpen ↗
04Chaos · sensitive dependence

Double Pendulum

A fan of double pendulums released from almost-identical angles. They track together for a moment, then the tiniest difference explodes into completely different paths — deterministic chaos, drawn as crisp fading arcs. Click to release a fresh fan.

chaosODEcanvasOpen ↗
05Reynolds flocking

Boids

Hundreds of agents running Craig Reynolds' three rules — separation, alignment, cohesion — with nothing choreographing them. Coherent flocks, splits, and swirls emerge from local interactions alone. Move your cursor to herd them.

emergentflockingcanvasOpen ↗
06A strange attractor in 3D

Lorenz Attractor

The Lorenz system — three coupled ODEs from atmospheric convection — integrated into its famous butterfly. The trajectory never repeats yet never escapes a bounded region: a strange attractor, traced as a luminous curve you can rotate.

chaosODE3DcanvasOpen ↗
07DFT · rotating circles draw a shape

Fourier Epicycles

Any closed path can be rebuilt as a sum of rotating circles — the discrete Fourier transform made visible. Each circle spins at its own frequency; chained tip-to-tip, the last tip retraces the original drawing. Click to switch shapes.

FourierDFTcanvasOpen ↗