A quake leaves as two waves. SEISMO races them through a layered earth and reads the gap between their arrivals — the number that measures the distance to the source.
SEISMO is a fictional observatory instrument for a single seismograph station, KRP. Its one job is to make the invisible seismic wavefield legible: to show that a rupture radiates a fast compressional P-wave and a slower shear S-wave, that both bend and reflect at the layer boundaries of the crust and mantle, and that the delay between their arrivals is a direct measure of range. Click anywhere in the earth to set a new focus; the wavefield re-radiates and the drum re-reads the gap.
Every colour is argued from the subject — the dark interior of the earth and the two waves that cross it. The bright wave colours are reserved for lines and marks; body copy runs in a derived warm ink for legibility.
Two stacked HTML canvases, no libraries. The cross-section is drawn in Canvas 2D; the seismograph drum is a second canvas below it. Both run from one clamped requestAnimationFrame clock that pauses when the tab is hidden.
The wavefronts are traced, not faked. Each quake shoots a fan of 132 rays from the hypocentre. Every frame a ray advances by the local layer velocity and, when it meets a boundary, refracts by Snell's law — because velocity rises with depth, rays bend away from vertical and dive, then turn back toward the surface exactly as real seismic rays do. A ray that reaches the free surface terminates as an arrival; connecting the tips of adjacent rays gives the wavefront, and a short position-history trails it as a wave packet. The P fan runs at 6.30 km/s, the S fan at 3.64 — so P visibly outruns S, layer after layer.
The drum is a physics readout. For each recorded event, the amplitude at any physical second is the sum of a background microseism, a damped P burst at its arrival, a larger S burst, and a long low-frequency surface-wave coda — the earth ringing like a bell after the sharp arrivals pass. The P and S onset times come from the epicentral distance and the two velocities; the strip marks them, brackets the gap, and multiplies it by roughly eight to recover the kilometres. Time is compressed sevenfold so a propagation that takes real minutes replays in seconds, while every number on screen stays in honest seconds and kilometres.