Object Oriented Orbits: a primer on newtonian physics
summary
Derives a discrete approximation to Newtonian motion, converts it to Ruby -> HTML5 canvas code that accepts a state and dt and streams frames over a WebSocket bridge, and reports implementation details like using requestAnimationFrame and WebSocketd with frame‑rate hiccups. Computes pairwise gravitational forces, shows randomized and highly symmetric setups, and reproduces a published figure‑eight 3‑body orbit from the literature, noting two‑body is analytic but three‑body requires careful initial conditions and small time steps.
AI-written summary · about
chapters (17)
- 0:00Intro
- 0:15What does it take to simulate orbits?
- 0:44Euclid's axioms
- 1:38Axiom 5 (The Parallel Postulate)
- 2:44Axioms 1 and 2 and vectors
- 7:37Vectors in Ruby (algebra)
- 10:47Relation between velocity and acceleration
- 13:10Newton's Law of Universal Gravitation
- 17:10A note about bodies
- 18:21Forces on Bodies in Ruby
- 19:25the Universe
- 20:29the Enumerable Universe
- 20:53The main simulation loop
- 23:57Shell out to websocketd
- 28:05Run simulated binary star system
- 35:35The initial conditions
- 39:19The git repository metaphor of physics
related talks
33mDeep Space - A Simulation Drama
45mNatural physics simulations and canvas hackery
27mCreating natural simulations in a web browser
09mSimulated Gravity Comes from Within!!
34mZero to One: The Mystical Mathematics Of Creative Coding
42mOrbital Rocket Guidance with Ruby
55m3D Physics for DOMies
33mYou Can Do What With Math Now?
