Physics Playground — Interactive Simulator
A hands-on physics sandbox with six live simulations: a projectile, orbits, colliding balls, a mass on a spring, a pendulum and two-source wave interference. Drag to aim, throw and pull, change gravity, mass and stiffness, and watch the readouts and the worked equations follow.
How to Use
- Pick a simulation from the tabs: Projectile, Orbit, Collisions, Spring, Pendulum or Waves. The controls for that mode appear under the tabs.
- Projectile: drag back from the launch point like a slingshot, or set the angle, speed, launch height and planet and press Launch. The default 30 m/s at 45° on Earth lands 91.7 m away.
- Orbit: drag out from empty space to fling a new body; the length of the drag sets its speed. Collisions: click to drop a ball or drag to throw one. Spring and Pendulum: drag the mass or bob and let go. Waves: drag the two white sources.
- Read the four readouts under the canvas. They change with the mode: range and flight time, orbital eccentricity, total momentum, period and frequency, or the number of bright interference lines.
- Use Pause, Step, Reset and the Speed slider at any time, then scroll to Show Work for the equations of the current mode with your numbers in them.
Worked Example
The default launch. A ball leaves the ground at v₀ = 30 m/s and θ = 45° on Earth (g = 9.81 m/s²). Its velocity splits into 30 × cos 45° = 21.213 m/s across and 21.213 m/s up. It rises for 21.213 ÷ 9.81 = 2.162 s and falls for the same time, so the flight lasts 4.325 s, it lands 21.213 × 4.325 = 91.74 m away (the same as v₀²·sin 2θ ÷ g = 900 ÷ 9.81), and it peaks at 21.213² ÷ (2 × 9.81) = 22.94 m. Raise the launch height to 20 m and the flight time becomes (21.213 + √(450 + 392.4)) ÷ 9.81 = 5.121 s, for a range of 108.63 m.
Same throw, other worlds. Switch the gravity menu and only g changes: 30 m/s at 45° goes 555.6 m on the Moon (1.62 m/s²), 242.6 m on Mars (3.71 m/s²) and 36.3 m on Jupiter (24.79 m/s²). Range scales as 1/g, so the Moon’s 6.06 times weaker gravity gives a 6.06 times longer throw.
The common mistake: assuming 45° always goes furthest. It does only when the ball lands at the height it was launched from. From the 20 m launch height the best angle is lower, about 39.8°: 40° carries 30 m/s to 109.94 m, further than the 108.63 m at 45°. And on flat ground 30° and 60° are not the “bad” angles they look like: both land at 79.45 m, because sin 60° = sin 120°.
Show Work
Formulas
The Physics Behind Each Mode
Galileo Galilei showed in his Two New Sciences (1638) that a projectile’s path is a parabola, the sum of steady motion across and uniformly accelerated fall, and that 45° gives the greatest range on level ground. Isaac Newton’s Principia (1687) gave the laws of motion and the inverse-square law of gravity behind the Orbit mode, and explained Johannes Kepler’s finding (1609) that planets move on ellipses. Christiaan Huygens worked out the period of a pendulum and, in 1673, why a large swing takes longer than a small one, and Robert Hooke stated his law of the spring, force proportional to stretch, in 1678.
For collisions, John Wallis, Christopher Wren and Huygens each presented rules to the Royal Society in 1668–1669 that amount to conservation of momentum; Newton added the coefficient of restitution for imperfect bounces. Thomas Young’s double-slit experiment, presented in 1803, used the interference of two sources, the pattern in the Waves mode, to argue that light is a wave.
About This Tool
The Physics Playground runs six simulations on one canvas, each stepping its equations every 1/120 s of simulated time: a projectile with optional quadratic air drag and the drag-free arc for comparison, orbits under softened Newtonian gravity with optional pulls between bodies, colliding balls resolved with momentum-conserving impulses, a damped mass on a spring with a live position graph, a pendulum with its large-amplitude period, and two interfering wave sources. Everything is interactive: drag to aim, throw, pull or move, and change gravity, stiffness or wavelength while it runs. The readouts and Show Work follow the current mode. Only the projectile, spring and pendulum use real units; orbits, collisions and waves are measured in canvas pixels.
It all runs in your browser and nothing is uploaded.
Related tools: Double Pendulum Chaos Lab, Projectile Motion Calculator, and Pendulum Calculator.
Frequently Asked Questions
Is this a real physics engine or just an animation?
Real physics. Every mode integrates its equations of motion in steps of 1/120 s: kinematics with optional quadratic air drag for the projectile, Newtonian gravity a = GM/r² for orbits, momentum-conserving impulses for collisions, m·a = −kx − cv for the spring and θ″ = −(g/L)sin θ − bω for the pendulum. The waves mode adds two cosine waves at every point. The readouts are computed from the running state, and Show Work prints the same numbers in the equations.
How far does a projectile go?
Without air resistance, from ground level, R = v₀²·sin 2θ ÷ g. At 30 m/s and 45° on Earth (g = 9.81 m/s²) that is 900 ÷ 9.81 = 91.7 m, with a peak of v₀²sin²θ ÷ 2g = 22.9 m and a flight time of 2v₀sin θ ÷ g = 4.32 s. The same throw on the Moon (g = 1.62 m/s²) goes 555.6 m. Turn on air drag and the ball falls well short, with the drag-free arc drawn faintly for comparison.
Why does kinetic energy drop in collisions sometimes?
Because of the bounce (restitution) setting e. At 100% the collisions are elastic and the total kinetic energy stays constant. Below that, each impact keeps only part of the energy of the motion along the line of impact: a fraction e², so 64% at a bounce of 80% and 25% at 50%. Momentum between balls is conserved at every setting, although the walls of the box reverse it, so watch the total change only when a ball hits a wall.
What do the Spring and Pendulum modes show?
Spring is a damped mass on a spring. Its natural period is T = 2π√(m/k): 1.405 s for the default 1 kg and k = 20 N/m, and the default damping of 0.3 gives a damping ratio of ζ = c ÷ 2√(km) = 0.034, so it rings for many cycles. Pendulum is a single bob: a 2 m pendulum on Earth has a small-swing period of 2π√(L/g) = 2.837 s, and the readout also gives the slightly longer period for the actual amplitude, 2.902 s at 0.6 rad.
Does any of this need the internet or send my data anywhere?
No. The whole simulator is plain JavaScript drawing on a canvas in your browser. There are no servers or accounts, nothing you do is uploaded, and it keeps working offline once the page has loaded.
How do I use the Physics Playground — Interactive Simulator?
Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.
Do I need to install or sign up for anything?
Not at all — it runs in the browser with nothing to install and no account. After it loads once, it even works without an internet connection.
Is my information private?
Yes. Everything happens in your browser. Nothing you type is sent to a server or saved anywhere.
Common Use Cases
Projectile homework
Check that 30 m/s at 45° lands 91.7 m away, then see why 30° and 60° both land at 79.45 m.
Gravity on other worlds
Throw the same ball on the Moon, Mars and Jupiter: 555.6 m, 242.6 m and 36.3 m at 30 m/s and 45°.
Conservation laws
Watch total kinetic energy hold at a bounce of 100% and fall away at 50%, where a head-on impact keeps 25% of the energy of approach.
Oscillators
Quadruple the spring stiffness from 20 to 80 N/m and see the 1.405 s period halve to 0.702 s.
Interference
Set two sources 5.5 wavelengths apart and count 11 bright lines fanning out between them.
Last updated: