Wind map — create({ tileable: true }), sampleMany, sampleGrad

A weather map is a wind field plus the grammar people read it with: streaklets that drift with the flow, a speed ramp with units, isotachs, and a cursor that tells you the vector under it. This library is a wind field, so nothing here is faked into place — the streaklets are integral curves of field.sampleMany, the isotachs are contours of the same samples, and the picker reads field.sample and field.sampleGrad at the cursor's exact coordinates. Drag to pan, wheel to zoom, hover to interrogate.

The map surface is one tile, repeated. That is what a map needs, and it is what tileable: true gives you: wavevectors snap to the integer lattice, so the field is exactly 2π-periodic and sampling at x mod 2π is continuous across the join. Turn it off and the same wrapping tears — the tile edges become hard lines you can see the streaklets kink across. The readout prints the seam mismatch max|u(0,y) − u(2π,y)| for both fields at once, live: ~1e-15 tileable against ~2 free, on a field whose |u| rms is ~1 — fifteen orders of magnitude, on one toggle. The dimmed one is the field you are not looking at.

Why the zoom goes deep — and what it does not do. There is no stored grid, so zooming re-evaluates rather than magnifies. Every layer is rebuilt at the new scale: the streaklets are integrated from fresh samples, and the underlay lattice is fixed in screen pixels, so at 64× it is sampling one point every ~1e-4 radians — a stored raster at that spacing would be about 63 000² cells across the tile. The readout times the per-frame batch to make the real point: the cost does not depend on the zoom. It is O(points × modes) and nothing in it knows what scale you are looking at, so the milliseconds sit still while the zoom slider travels seven octaves.

What zooming does not do is invent detail. The field is band-limited at kmax, so past roughly kmax× there is nothing smaller to find and the map correctly goes smooth and near-uniform — and honestly, a stored grid at this spectrum's Nyquist rate would hold that same information. The analytic form is not more accurate than a well-chosen raster; it is that you never have to choose one, store one, or resample it, and that the answer at an arbitrary real coordinate is the field's own value rather than a blend of its neighbours.

helix-noise · tileable field · canvas 2d
—
wind speed
0

What this is not. It is a kinematic velocity field with the right statistics and exact incompressibility, and nothing else: no pressure solve, no Coriolis, no thermodynamics, no terrain, no data assimilation. It cannot forecast anything. The m/s axis is a scaling you choose — the field is normalised to unit rms speed and rms wind pins that rms to a number; the library ships no physical calibration. The level z slider moves the slice through the third dimension, which is a real change of flow, not a re-seed.

One thing on screen is genuinely three-dimensional. This is a horizontal slice of a 3-D divergence-free field, and the two components drawn are not divergence-free on their own: ∂ₓu + ∂ᵧv = −∂𝓏w exactly. So the streaklets really do bunch along convergence lines and thin out over divergence — that is the vertical motion showing itself in a horizontal picture, the same reason a real surface chart puts weather where the air converges. The picker prints ∇ₕ·u from sampleGrad alongside the vertical component w whose ∂𝓏 it is the negative of. Read w as a component of an isotropic 3-D field, not as meteorology: here all three components have the same rms, whereas real atmospheric vertical motion is smaller than the horizontal by orders of magnitude, because stratification suppresses it and this field has no stratification. With weather at 0 the field is steady, so the trails are exactly streamlines; above 0 the field evolves while a trail is being drawn, and — because the streaklets step a fixed number of screen pixels per m/s rather than a fixed slice of time — they are then neither streamlines nor true pathlines, which is the ordinary wind-map compromise.

starting…