Devlog #55 – Wave 35: Harmonograph, Sand Dune & Coral Reef

Wave 35 spans mathematics, earth science, and marine biology: a dual-pendulum harmonograph that draws progressive Lissajous curves with exponential damping, a cellular automaton aeolian sand dune model with emergent barchan morphology, and a coral reef simulation where temperature-driven bleaching and colony recovery dynamics unfold in real time. All three ship with complete Ukrainian translations on day one.

Release Stats

478
Total simulations
55
Devlog entries
35
Release waves
1672
Sitemap URLs

New Simulations

🎨

Harmonograph

Dual-pendulum parametric curve plotter using coupled sinusoidal oscillators with exponential damping. Six presets (Lissajous, Flower, Spiral, Star, Rose, Web) plus manual frequency, phase, and damping controls. Four color modes and Save PNG export.

Open Harmonograph →
🏜️

Sand Dune

Cellular automaton model of aeolian sand transport. Wind moves grains by saltation hops; an avalanche rule enforces the angle of repose. Three starting scenarios let you observe ripple coarsening, barchan growth from a pile, and transverse ridge formation.

Open Sand Dune →
🪸

Coral Reef

Four-state CA (water, coral, bleached, dead/algae) on a 140×100 grid. Eight seed colonies grow outward; raising the temperature slider past 28 °C triggers progressive bleaching and death. Animated underwater caustic light effect.

Open Coral Reef →

Harmonograph — Design Notes

Dual-Pendulum Model

The classic rotary harmonograph uses two pendulums: one controlling horizontal displacement and one controlling vertical displacement. On this simulator both pendulums follow a damped sinusoidal model:

where SCALE = 210 px, d is the shared damping coefficient (0.0001–0.008), and phase offsets φ1,2 range over 0–2π. Integer frequency ratios (2:3, 3:4, 5:4 …) produce closed Lissajous figures; irrational ratios produce slowly precessing open curves.

Progressive Drawing

Rather than computing the entire curve in one frame (which would feel instant and unrewarding), the simulation draws a configurable number of line segments per animation frame. The “Draw speed” slider sets the total target points from 100 to 3000; each frame draws Math.ceil(totalPts / 60) segments so the curve always completes in roughly one second regardless of speed setting. Segments between consecutive (x, y) samples are joined with ctx.lineTo from the stored lastX/lastY position.

Color Modes

Four color modes are available: Pink (hsla(320, 90%, 75%)), Rainbow (hue increments by 0.5 per segment, cycling through all 360° over the course of the curve), Cyan (hsla(185, 90%, 65%)), and Gold (hsla(45, 90%, 65%)). All modes use a semi-transparent stroke (alpha 0.7) so overlapping passes blend.

Presets

Six named presets cover the most visually interesting parameter combinations:

Sand Dune — Design Notes

Saltation Algorithm

The 140×80 integer height grid stores sand grain counts per cell (0–maxH). Each simulation step runs wind × 3 × GX saltation attempts: a random cell is selected; if it has sand, a grain hops downwind by floor(1 + rand × wind × 0.8) cells and is deposited at the destination (if below maxH). Additional grains enter from the windward (left) edge at a rate controlled by the sand supply slider, and grains exit at the leeward (right) edge.

Avalanche Rule

After each saltation pass, an avalanche sweep propagates: if any horizontally adjacent pair of cells has a height difference exceeding the angle-of-repose threshold arp (default 4, range 2–8), half the excess is transferred immediately. The sweep repeats until no violations remain (capped at 30 iterations to prevent infinite loops on steep initial conditions). This reproduces the characteristic asymmetry of real dunes: gentle windward slope, steep slip face on the leeward side.

Emergent Morphologies

The three starting scenarios reveal different dune types familiar from field geomorphology:

Coral Reef — Design Notes

Four-State CA

Each cell on the 140×100 grid holds one of four discrete states: Water (empty, rendered as the ocean background), Coral (rendered with a colony-specific HSL hue drawn from 8 colour families), Bleached (pale blue–white), or Dead/Algae (dark olive-green). A parallel hue array stores the colour of each coral cell so colony identity is preserved through bleaching and recovery.

Temperature-Driven Rules

Each frame samples 15 % of all cells stochastically and applies five rules depending on the current temperature slider value:

This reproduces the field-observed hysteresis: mild heat stress above 28 °C causes gradual bleaching that reverses if temperatures drop, but prolonged exposure above 30.5 °C causes permanent mortality and subsequent algae takeover.

Underwater Caustics

Six animated quadratic Bézier curves with oscillating control points simulate the refracted light patterns (“caustics”) visible on shallow reef floors. They are drawn at 6 % opacity in cyan over the deep-water background gradient before the cell grid is rendered on top, so they are only visible through water cells.

Ukrainian Translations

All three simulations ship with complete Ukrainian (UK) versions at /uk/harmonograph/, /uk/sand-dune/, and /uk/coral-reef/. UI labels, info panels, preset names, stat boxes, and educational text are fully translated. The physics and rendering code is identical between EN and UK pages.

What’s Next — Wave 36 Preview

The backlog continues to grow. Candidates for Wave 36 include:

All Wave 36 simulations will ship with EN + UK pages on launch day.