🌊 Ocean Tides
Interactive ocean tides simulation: see how the Moon and Sun raise two tidal bulges, watch spring and neap tides emerge from real 1/r cubed tidal-force math.
About this simulation
This simulation numerically computes real lunar and solar tidal accelerations from Newton's differential-force formula a_tide = 2GMR/r³, where G is the gravitational constant, M the perturbing body's mass, R Earth's radius, and r the distance to that body. Vectors for the Moon (orbiting once per 27.32-day sidereal month) and the fixed Sun are summed to find the combined bulge axis and its amplitude H = a_moon + a_sun·(3cos²θ−1)/2, where θ is the Sun–Moon angle. As Earth rotates beneath this pattern, a virtual tide gauge records water height, generating a synthetic 30-day chart that reveals the semi-diurnal cycle and the spring–neap modulation.
What it shows
Two tidal bulges raised on Earth by the differential gravitational pull of the Moon and Sun, plus the water-height record traced out at a movable tide-gauge point as Earth's simulated rotation carries it through the bulge pattern.
How to use it
Drag Time speed to fast-forward days, Moon distance to weaken or strengthen lunar tides, and Tide-gauge longitude to relocate the observer. Toggle Include Sun to compare spring tides against Moon-only tides, and use Pause/Reset to freeze or restart the clock.
Did you know
The Sun is about 27 million times more massive than the Moon, yet it sits roughly 390 times farther away. Because tidal force falls off as the cube of distance, the Sun's pull ends up only about 46% as strong as the Moon's.
Frequently Asked Questions
Why does tidal force fall off as 1/r³ instead of 1/r² like ordinary gravity?
Tides arise from the difference in gravitational pull between the near and far sides of Earth, not from gravity itself. Differentiating Newton's 1/r² force law with respect to r introduces an extra factor of 1/r, giving the 1/r³ dependence used in this simulation's a_tide = 2GMR/r³ formula. That steep fall-off is why the much closer Moon dominates over the far more massive Sun.
Why are there two tidal bulges instead of one?
The near side of Earth is pulled toward the Moon more strongly than Earth's center is, while the center is pulled more strongly than the far side. Relative to Earth's center this produces two outward-stretching accelerations — one toward the Moon and one directly away from it — creating bulges on opposite sides at the same time, which is why the simulated tide gauge sees roughly two highs and two lows during every Earth rotation.
What causes spring and neap tides?
The simulation combines the Moon's and Sun's tidal vectors using H_amp = a_moon + a_sun·(3cos²θ−1)/2, where θ is the angle between the Sun and Moon as seen from Earth. When θ≈0° or 180° (new or full Moon) the two vectors reinforce, producing spring tides; near θ≈90° (first/last quarter) they partly cancel, giving smaller neap tides — exactly what the Regime readout and Moon-phase indicator track as the Moon orbits.
Why is the Sun's tidal effect weaker than the Moon's despite being far more massive?
Tidal strength depends on M/r³, not on mass alone. The Sun's mass (1.989×10³⁰ kg) is about 27 million times the Moon's (7.342×10²² kg), but the Sun's distance (1.496×10¹¹ m) is roughly 390 times the Moon's (3.844×10⁸ m). Cubing that distance ratio overwhelms the mass ratio, leaving solar tides at about 46% of lunar strength, matching the simulation's Solar tidal a readout.
What does the tide-gauge chart at the bottom represent?
It plots gaugeHeight = H_amp·(cos²Δ − 0.5), where Δ is the angle between the observer's longitude and the current bulge axis, converted to metres and recorded for the last 30 simulated days. As Earth rotates and the Moon orbits, this produces the characteristic twice-daily tidal rhythm modulated by the slower spring–neap cycle.
The Moon and Sun raise tidal bulges on Earth; their alignment drives spring and neap tides. See the 1/r³ tidal force, watch the bulge axis follow the Sun-Moon resultant, and read a tide gauge.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install