Tidal torque locks a planet's rotation to its mean orbital motion, so its spin rate is constant: the body-fixed "prime meridian" advances as the mean anomaly M = n·t, where n = 2π/T is the mean motion. But Kepler's second law says the planet does not sweep out true orbital angle at a constant rate on an eccentric orbit — it moves faster near periapsis and slower near apoapsis. The actual direction to the star, the true anomaly ν, is found from the eccentric anomaly E via Kepler's equation:
M = E − e·sin(E) (Kepler's equation, solved for E by Newton iteration)
tan(ν/2) = √((1+e)/(1−e)) · tan(E/2)
Because the body's spin angle tracks M exactly while the true sub-stellar direction tracks ν, the two drift apart and back together once per orbit. This mismatch is the forced libration in longitude:
ψ(t) = ν(t) − M(t) ≈ 2e·sin(M) + (5/4)e²·sin(2M) + …
To leading order the libration amplitude is simply ≈ 2e radians — a planet on a circular orbit (e = 0) shows a perfectly fixed substellar point, while a modest e = 0.2 already produces a ±23° back-and-forth swing of the terminator twice per orbit. This is the same mechanism behind the Moon's real optical libration in longitude, and it matters for exoplanets because the amplitude of this periapsis-driven wobble sets how far the day/night boundary sweeps across the surface even for a "perfectly" tidally locked world.
- Eccentricity slider — sets e directly; the orbit ellipse and libration amplitude update live.
- Time speed — scales simulated time; libration is fastest near periapsis (bottom of the ellipse here).
- Wobble meter — the live value of ψ mapped onto a left–right dial so the oscillation is visible even at a glance.