
2D Simulation
How to use
What it does
Simulates several classic physical systems on a 2D plane: pendulum motion, the chaotic trajectory of the Lorenz attractor, gravitational interaction between multiple bodies, and the path distribution of a random walk. Each runs with adjustable parameters in real time, which helps make concrete ideas like sensitivity to initial conditions in chaos, or how damping decays an oscillation.
How to use it
Tabs at the top switch between pendulum, Lorenz, gravity and random walk. The pendulum takes an initial angle you can drag plus gravity and damping coefficients; the Lorenz simulation responds to parameter changes where a tiny difference produces a completely different path; gravity lets you click the canvas to add a new mass; the random walk takes a step count and can overlay the previous run for comparison.
FAQ
Which simulations does the tab bar include?
Eleven: double pendulum, Lorenz attractor, reaction-diffusion, a gravity particle sandbox, random walk, falling-sand fluid, projectile motion, light refraction, lens imaging, an ant colony and a bee swarm.
How do I control the gravity sandbox?
Left-drag sprays particles, a quick click triggers an explosion, and holding the right button attracts particles to the cursor; touch screens support the same gestures. The particle cap is 2000.
What do the feed and kill sliders do in the reaction-diffusion tab?
They are the Gray-Scott feed and kill rates; different combinations grow visibly different stripe and dot patterns, and Reseed re-randomizes the starting blobs.
Related articles
More tools
Music box, metronome, synthesizer and numbered notation
Bar/pie/line charts, decision matrix, A/B sample size, radar, heatmap, boxplot, candlestick and bubble charts — all rendered with pure SVG.
Convert HTML/JSX, build clip-path, glassmorphism and neumorphism styles.
Cheat sheets for shell, vim, tmux, systemd, Docker, K8s, nginx, git and more.
JSON formatter, LOC counter, TODO extractor, JSDoc comment generator, complexity estimator and code card, plus key-code, Unicode, URL-params, favicon and OG-image helpers.
Lot drawing, I Ching coin casting, daily tarot draw, Guandi lots, coin-flip decisions, dream dictionary and a fun fortune teller.