Physics Lab

Projectile · Collision · Orbital — compare physics across Earth, Mars, and the Moon.

Earth Mars Moon
Launch parameters
Advanced physics
Active worlds
Earth: g=9.81 m/s², ρ₀=1.225, H=8.5 km Mars: g=3.71 m/s², ρ₀=0.020, H=11.1 km Moon: g=1.62 m/s², vacuum

Earth

g 9.81 · atm 1.225 kg/m³
Range
Max Height
Flight Time
Impact Speed
Bounces
0

Mars

g 3.71 · atm 0.020 kg/m³
Range
Max Height
Flight Time
Impact Speed
Bounces
0

Moon

g 1.62 · vacuum
Range
Max Height
Flight Time
Impact Speed
Bounces
0
Energy over time
Kinetic Potential Total

How the engine works

Integrated with classical 4th-order Runge–Kutta (RK4) at a 10 ms timestep. Equations of motion:

F_gravity = -m · g · ŷ
F_drag    = -½ · ρ(h) · C_d · A · |v_rel| · v_rel        where v_rel = v - v_wind
F_magnus  =  ρ(h) · A · r · (ω × v_rel)                  (out-of-page spin)
a         = (F_gravity + F_drag + F_magnus) / m
ρ(h)      = ρ₀ · exp(-h / H)                              (isothermal atmosphere)

On the Moon, ρ = 0, so drag and Magnus vanish and the trajectory reduces to the ideal parabola. On Mars, the atmosphere is thin enough that heavy dense projectiles barely notice it.

Two-body collision (1D)
Collision physics is universal — v₁' and v₂' depend only on masses, velocities, and e. Post-impact sliding differs — friction force = μ·m·g, so lower g means blocks slide farther.

Earth

v₁ after
v₂ after
Slide dist (m₁)
Slide dist (m₂)

Mars

v₁ after
v₂ after
Slide dist (m₁)
Slide dist (m₂)

Moon

v₁ after
v₂ after
Slide dist (m₁)
Slide dist (m₂)

Collision + sliding friction

Momentum is always conserved: m₁v₁ + m₂v₂ = m₁v₁' + m₂v₂'. Kinetic energy is conserved only when e = 1. The closed-form solution:

v₁' = ((m₁ − e·m₂)·v₁ + (1 + e)·m₂·v₂) / (m₁ + m₂)
v₂' = ((m₂ − e·m₁)·v₂ + (1 + e)·m₁·v₁) / (m₁ + m₂)

After the collision, each body decelerates at a = μ·g. Because stopping distance is v²/(2μg), halving gravity doubles the sliding distance.

Orbital trajectory
Planet
Circular velocity vc = √(GM/r) Escape velocity ve = √(2GM/r) = vc·√2

Gravity with 1/r² falloff

Above the atmosphere, gravity weakens with distance: a = GM / r² directed toward the planet center. Integrated with RK4 at 2-second steps. A purely tangential launch at vc produces a circular orbit; between vc and ve, an ellipse; at or above ve, the projectile escapes on a hyperbolic trajectory.

v_circ = √(GM / r)      — circular orbit speed at radius r
v_esc  = √(2GM / r)     — minimum escape speed
Earth @ 200 km:  v_c ≈ 7.78 km/s,  v_e ≈ 11.01 km/s
Mars  @ 200 km:  v_c ≈ 3.45 km/s,  v_e ≈ 4.88 km/s
Moon  @ 200 km:  v_c ≈ 1.60 km/s,  v_e ≈ 2.26 km/s
Sound propagation
Click anywhere on the canvas to emit a pulse. Each click fires a simultaneous pulse in all three lanes — watch how fast the wave propagates in each medium.
Earth 343 m/s 20°C, N₂/O₂
Mars 240 m/s −60°C, CO₂
Moon — m/s vacuum
Speed of sound c = √(γRT/M) — depends on gas composition and temperature. Amplitude ∝ 1/r × initial density — Mars pulses start quieter because the air is thin.

Sound needs a medium

Sound is a longitudinal pressure wave propagating through a gas (or liquid, or solid). Its speed is set by the compressibility and inertia of the medium:

c = √(γ · R · T / M)
where γ = heat capacity ratio, R = gas constant, T = temperature, M = molar mass

Earth air (N₂/O₂ at 293 K) gives 343 m/s. Mars CO₂ at 213 K gives 240 m/s — slower because CO₂ is heavier and colder. On the Moon, there is essentially no atmosphere: no medium, no mechanical wave. Two astronauts standing next to each other can't hear each other directly — they have to use radios.

Amplitude also matters. A sound wave's pressure amplitude is proportional to the source intensity divided by the distance (spherical spreading). On Mars the air is ~160× thinner than Earth's, so the same source puts far less acoustic energy into the medium — it sounds muffled and faint, on top of traveling slower.

Simple pendulum
A pendulum's period depends on its length and the local gravity: T = 2π√(L/g). Same rod, three worlds — three different beats.
Earth T =
Mars T =
Moon T =
T = 2π√(L/g) — period is independent of mass and (for small angles) amplitude. Earth @ 1m: ~2.0 s · Mars: ~3.3 s · Moon: ~4.9 s

Why they swing at different rates

A pendulum's restoring force is −m·g·sin(θ), and its equation of motion is

θ''(t) = −(g/L) · sin(θ) − b · θ'

Small-angle approximation (sin θ ≈ θ):
θ(t) = θ₀ · cos(2π · t / T)    with    T = 2π · √(L/g)

Same length, three gravities, three periods. The ratio Earth : Mars : Moon is roughly 1 : 1.63 : 2.46 — exactly √(g_Earth / g_world). The mass of the bob doesn't appear anywhere: heavy or light, the period is the same.

Turn the initial angle up past ~30° and you'll see the small-angle approximation break down — the full nonlinear equation integrated here with RK4 gives a slightly longer period for larger swings.

Boiling point vs pressure
Water boils when its vapor pressure equals the surrounding atmospheric pressure. Thinner air means water boils at a lower temperature — and in a vacuum, liquid water simply cannot exist.
Earth P = 101.3 kPa, boil at
Mars P = 610 Pa, boil at
Moon P = 0 Pa, no liquid
Clausius–Clapeyron: ln(P/P₀) = −ΔHvap/R · (1/T − 1/T₀) ΔHvap(water) = 40.66 kJ/mol

Why boiling point depends on pressure

A liquid boils when its vapor pressure equals the ambient pressure. In a thinner atmosphere there's less "pushback," so boiling happens at a lower temperature. The Clausius–Clapeyron relation links them:

1/T_boil = 1/T₀ − (R / ΔH_vap) · ln(P / P₀)

With water constants:
  T₀, P₀  = 373.15 K, 101.325 kPa
  ΔH_vap = 40 660 J/mol

Earth (101 325 Pa): T_boil ≈ 100 °C
Mars  (610 Pa):     T_boil ≈ −5 °C      ← below room temperature!
Moon  (0 Pa):       no liquid phase

On Mars, an astronaut's uncovered coffee would boil before it got warm enough to drink. On the Moon, water skips the liquid phase entirely — ice sublimes directly into vapor at any temperature above the triple point (0.01 °C, 611 Pa). This is why there's no standing water in any form on the lunar surface.