Gravity Simulator
An interactive, browser-based web application designed to demonstrate the fundamental principles of classical mechanics, free fall, atmospheric drag, and energy conservation.
PhysiLab Gravity 3.0
Environment
Scene (shared by both objects)
Quick start
- Open the Simulator tab and press the blue button. The ball is released from rest and falls.
- Press to reset and drop it again. Drag the sliders to change the conditions, then drop again.
- Click Galileo Mode to drop two objects side by side and compare them.
- Open Real-time Telemetry (top of the control panel) to see live numbers and graphs.
- Try one of the guided experiments below. Each button sets everything up and starts the drop for you.
Guided experiments
Each button loads a ready-made scenario in the simulator and starts it. Watch the two objects (blue and amber) and compare their 1st Impact times in the Telemetry tab.
1. Hammer and feather on the Moon
A 1 kg sphere and a 0.01 kg feather dropped on the Moon, where there is no air.
Look for: both land at exactly the same instant.
2. The same drop on Earth
Same objects, now in Earth's atmosphere.
Look for: the feather reaches a low terminal velocity almost immediately and drifts down. The drag arrow (amber) grows until it balances gravity (red).
3. Heavy vs light, same shape
A 1 kg and a 10 kg sphere dropped from 25 m on Earth.
Look for: the heavier sphere lands slightly earlier. Air resistance matters a little more for the lighter one, because its terminal velocity is lower.
4. Same mass, different shape
A 0.05 kg sphere and a 0.05 kg flat sheet dropped from 25 m.
Look for: shape alone changes the fall. The sheet has a much larger drag area, so it slows to a much lower terminal velocity.
5. A bouncing ball
A single 1 kg sphere with a bouncy surface (\(e = 0.8\)). Open the Telemetry tab and watch the energy graph.
Look for: each bounce reaches roughly \(e^2 = 64\%\) of the previous height, and total energy steps down at every impact.
Controls reference
- Environment presets
- Earth, Moon, Mars, Jupiter, Zero-G or Custom. A preset sets gravity and air density together and restarts the drop.
- Gravity \(g\)
- Strength of gravity from 0 to 30 m/s². Moving the slider switches the preset to Custom. Changes apply immediately, even mid-fall.
- Atmospheric Drag
- Switch air resistance on or off. Off is equivalent to dropping in a vacuum.
- Air Density \(\rho\)
- How thick the air is (Earth at sea level is 1.225 kg/m³). Applies immediately.
- Drop Height \(h\)
- Release height from 1 to 25 m. Restarts the drop.
- Ground Restitution \(e\)
- Bounciness of the ground: 0 means no bounce, 1 means a perfect bounce. Applies to both objects and takes effect immediately.
- Simulation Speed
- Slow motion (0.1x) to fast forward (2.5x). The physics stays accurate at every speed.
- Object profile
- Sphere, Sheet or Feather. Each has its own drag coefficient and area. Restarts the drop.
- Mass \(m_1\), \(m_2\)
- From 0.01 to 50 kg for each object. Restarts the drop.
- Galileo Mode
- Adds Object 2 (amber) next to Object 1 (blue) so you can compare two objects in identical conditions.
- Vectors / Trail
- Show or hide the force and velocity arrows and the dashed path.
- Keyboard
- Space play / pause R reset → step forward 0.03 s
Reading the display
- Green arrow: velocity. It points down while falling and up after a bounce, and its length is proportional to speed.
- Red arrow: gravity (the weight). It stays constant.
- Amber arrow: air drag. It always opposes the motion and grows with speed. When it matches the red arrow, the object has reached terminal velocity.
- vterm badge (top of the canvas): the terminal velocity for the current settings. In Galileo mode it shows both objects as Object 1 / Object 2. It is hidden when there is no drag or no gravity.
- 1st Impact (Telemetry tab): the time at which each object first touched the ground. This is the best number for comparing two objects.
- Energy: kinetic plus potential energy. In a vacuum with no bounce it stays constant. With drag or bounces it falls.
Tips
- Changing drop height, mass, shape or an environment preset restarts the drop. Gravity, air density, restitution and speed can be changed live.
- Sound effects start after your first click or key press, because browsers block audio until then. Use the Sound button to mute.
- For a clean comparison, change one thing at a time and keep the other object as a reference.
- On a small screen the page scrolls. On a desktop-sized window the whole simulator fits in view without scrolling.
Key ideas in one minute
- Without air, every object falls with the same acceleration \(g\), whatever its mass or shape.
- With air, a drag force that grows with the square of speed opposes the motion. When drag equals weight the object stops accelerating and falls at its terminal velocity.
- Terminal velocity is lower for objects with a large area or high drag coefficient and a small mass, which is why a feather falls slowly and a hammer does not.
- When an object bounces it keeps only a fraction \(e\) of its speed, so it loses energy at every impact.
1. Free fall and Galileo's insight
Aristotle's view that heavy things fall faster than light things was challenged by Galileo, who argued that differences in falling speed come from the medium (air) and not from the weight itself. Newton's laws explain why. The only force on a falling body in a vacuum is its weight \(W = mg\), and Newton's second law gives
\[ a = \frac{F}{m} = \frac{mg}{m} = g \]The mass cancels because the quantity that appears in gravity (gravitational mass) equals the quantity that resists acceleration (inertial mass). In 1971 Apollo 15 astronaut David Scott demonstrated this on the Moon by dropping a hammer and a feather together. With no atmosphere they hit the ground at the same time.
Fall without drag
Starting from rest at height \(h\), with velocity \(v\) measured downward:
\[ v = g t, \qquad y(t) = h - \tfrac{1}{2} g t^2, \qquad t_{fall} = \sqrt{\frac{2h}{g}}, \qquad v_{impact} = \sqrt{2 g h} \]Gravity on other worlds
Surface gravity depends on the body's mass \(M\) and radius \(R\):
\[ g = \frac{G M}{R^2} \]The table shows the simulator's presets and what they predict for a 10 m drop in a vacuum:
| World | \(g\) (m/s²) | Fall time (s) | Impact speed (m/s) |
|---|---|---|---|
| Earth | 9.81 | 1.43 | 14.0 |
| Moon | 1.62 | 3.51 | 5.7 |
| Mars | 3.72 | 2.32 | 8.6 |
| Jupiter | 24.79 | 0.90 | 22.3 |
2. Air resistance and terminal velocity
At everyday speeds and sizes, air drag is well described by the quadratic drag law:
\[ F_d = \tfrac{1}{2}\,\rho\, C_d\, A\, v^2 \]where \(\rho\) is the air density, \(A\) the cross-sectional area facing the flow, \(v\) the speed and \(C_d\) the dimensionless drag coefficient, which depends on shape. Drag always points opposite to the velocity. Taking downward as positive, the equation of motion is
\[ m\frac{dv}{dt} = m g - \tfrac{1}{2}\,\rho\, C_d\, A\, v\,|v| \]As the object speeds up, drag grows until it cancels the weight. The acceleration is then zero and the speed stops changing:
\[ v_{term} = \sqrt{\frac{2\,m\,g}{\rho\, C_d\, A}} \]For a drop from rest, the equation has an exact solution:
\[ v(t) = v_{term}\tanh\!\left(\frac{g\,t}{v_{term}}\right), \qquad s(t) = \frac{v_{term}^2}{g}\,\ln\cosh\!\left(\frac{g\,t}{v_{term}}\right) \]Early on, \(\tanh x \approx x\) so \(v \approx g t\), which is free fall. At late times \(\tanh \to 1\) and \(v \to v_{term}\).
Why mass and shape both matter
Terminal velocity grows with \(\sqrt{m}\) and shrinks with \(\sqrt{C_d A}\). A heavier object of the same shape therefore falls faster in air, and a flat sheet falls far more slowly than a ball of the same mass.
| Profile | \(C_d\) | \(A\) (m²) | \(v_{term}\), 0.05 kg | \(v_{term}\), 1 kg |
|---|---|---|---|---|
| Sphere | 0.47 | 0.05 | 5.8 m/s | 26.1 m/s |
| Flat sheet | 1.2 | 0.15 | 2.1 m/s | 9.4 m/s |
| Feather | 2.0 | 0.01 | 6.3 m/s | 28.3 m/s |
Values are for Earth at sea level (\(g = 9.81\ \mathrm{m/s^2}\), \(\rho = 1.225\ \mathrm{kg/m^3}\)).
3. Energy
Kinetic and potential energy of an object at height \(y\) moving at speed \(v\):
\[ E_k = \tfrac{1}{2} m v^2, \qquad E_p = m g y, \qquad E = E_k + E_p \]In free fall without drag, \(E\) is constant: potential energy is converted into kinetic energy. With drag, the air does negative work on the object and the energy is dissipated as heat in the air:
\[ \frac{dE}{dt} = -F_d\, v = -\tfrac{1}{2}\,\rho\, C_d\, A\, |v|^3 \]At terminal velocity \(E_k\) is constant, so the object is converting potential energy into heat at the rate \(m g\, v_{term}\). You can see this on the energy graph as kinetic energy flattening while potential energy keeps falling.
4. Bouncing and restitution
The coefficient of restitution \(e\) is the ratio of the speed after impact to the speed before:
\[ e = \frac{|v_{after}|}{|v_{before}|}, \qquad 0 \le e \le 1 \]A perfectly elastic bounce has \(e = 1\) and a perfectly inelastic one has \(e = 0\). The kinetic energy retained is a fraction \(e^2\), and the missing energy becomes heat, sound and deformation. Without drag, the height after the \(n\)-th bounce and the total time until the bouncing stops are
\[ h_n = e^{2n}\,h, \qquad t_{total} = \sqrt{\frac{2h}{g}}\;\frac{1+e}{1-e} \]Mathematically there are infinitely many bounces, but they take a finite total time. The simulator treats any impact slower than 0.4 m/s as the object coming to rest.
5. How the simulation works
The simulator integrates the equation of motion numerically, using small time steps of at most 4 ms. At each step it computes the net acceleration from gravity and drag, then updates speed and position (the semi-implicit Euler method):
\[ a_n = g - \frac{F_d(v_n)}{m}, \qquad v_{n+1} = v_n + a_n\,\Delta t, \qquad y_{n+1} = y_n - v_{n+1}\,\Delta t \]When the object reaches the ground, its velocity is reversed and multiplied by \(e\). Small time steps keep the results accurate even for light objects with a low terminal velocity, and at fast simulation speeds. Each object is simulated independently, so Object 2 never affects Object 1.
6. Assumptions and limitations
- Constant gravity. Reasonable for drops of tens of metres. The change in \(g\) over 25 m is a few parts per million.
- Constant air density. Real air thins with altitude. This does not matter over 25 m, but it matters for skydiving or spacecraft re-entry.
- Quadratic drag only. Very small or very slow objects (such as dust or a falling hair) experience drag closer to linear in speed, and \(C_d\) itself varies with speed.
- One dimension. Real sheets flutter and tumble and real feathers rotate, which changes their drag moment to moment. There is no wind, spin or buoyancy.
- Atmosphere values. Earth (1.225 kg/m³) and Mars (about 0.02 kg/m³) use realistic surface values and the Moon has essentially no atmosphere. Jupiter has no solid surface to drop things onto, so its air density is an illustrative value for demonstration.
- Simplified shapes. The three profiles are idealised. Use them to compare effects qualitatively, not to predict the fall of a specific real object.
