Integration
Drop a ball and put two moons in orbit, and watch the order of two lines decide between a stable orbit and a moon spiraling off into space.
Open it in the simulatorBuild a 2D physics engine in C++ on an ESP32-C3: vectors, time steps, integration, collisions, springs, friction and rigid bodies, ending in a tilt-driven marble sandbox.
0 of 7 done
7 lessons in 4 chapters, about 6 hours on a simulated ESP32-C3-DevKitM-1. Free, in your browser, every step checked by the simulator.
Drop a ball and put two moons in orbit, and watch the order of two lines decide between a stable orbit and a moon spiraling off into space.
Open it in the simulatorHooke's law and a damper: measure a spring's period against theory, find critical damping, and hang a swinging tether of eight masses from a station.
Open it in the simulatorGive a body an angle and a spin: moment of inertia, torque from an off-center kick, and contact impulses that make a solar panel tumble and settle.
Open it in the simulatorEach lesson opens when the one before it is done, and each chapter ends in a project.
Vectors, fixed time steps, and why the order of two lines keeps a moon in orbit.
Write a 2D vector type with real C++ operators, move a probe through space one fixed time step at a time, and keep physics on its own clock.
0 of 4 steps
Drop a ball and put two moons in orbit, and watch the order of two lines decide between a stable orbit and a moon spiraling off into space.
0 of 5 steps
Impulses that keep momentum, and the force law behind every rope and shock absorber.
Detect overlapping asteroids, push them apart, and bounce them with an impulse that keeps momentum exactly, and energy as much as restitution allows.
0 of 4 steps
Hooke's law and a damper: measure a spring's period against theory, find critical damping, and hang a swinging tether of eight masses from a station.
0 of 5 steps
Stick and slip on a rolling deck, then bodies that turn as well as move.
Slide a crate to a stop, find the angle where static friction lets go, and ride a cargo crate on the deck of a ship rolling in a swell.
0 of 5 steps
Give a body an angle and a spin: moment of inertia, torque from an off-center kick, and contact impulses that make a solar panel tumble and settle.
0 of 4 steps
An MPU6050 tips a tray of marbles: the whole engine in one loop.
Tilt the board and a tray of marbles rolls downhill: an MPU6050 sets gravity, and integration, collisions, restitution and rolling do the rest.
0 of 5 steps
All 7 lessons, in order, each with what it covers. Any of them opens in the editor right away.
Every lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.
Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.
See every kitYes. All 7 lessons of Write a physics engine are free and run in your browser, with nothing to install and no parts to buy before you start.
No. Every lesson runs on a simulated ESP32-C3-DevKitM-1 with its parts on the canvas, and the simulator checks each step as you go. When you want to build it for real, the same wiring and code work on a real board.
About 6 hours: 7 lessons in 4 chapters, each one a few short steps. Your progress is kept, so you can stop after any lesson and pick up where you left off.
Each chapter ends in a project that puts it together: Integration, Springs and Rigid bodies.
With "Vectors and time steps", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.