Starry Night Flow
- group .........
- 3D and WebGL scenes
- source ........
- https://ui.aryank.space/components/starry-night-flow
- markdown ......
- /lab/starry-night-flow.md
- human .........
- /lab/starry-night-flow
── WHAT_IT_IS ────────────────────────────────────────────────────────────────────────────────
Van Gogh's Starry Night as a painting that sleeps until you wake it. At rest it hangs dim and desaturated, Floyd-Steinberg dithered into a WebGL point cloud pinned to its own pixels. Click any part (the cypress, the village, the swirls, the stars) and light spreads outward from the exact pixel you hit: color comes back, and as the front passes, those brushstrokes lift off and travel along the direction a structure tensor recovered from the paint. Click again to put that part back to sleep. Inspired by Joshua Garcia's Still Night.
── BEHAVIOUR ────────────────────────────────────────────────────────────────────────────────
* The painting sleeps until you click it
At rest every particle sits on its home pixel at half brightness, so the field reads as the painting itself: dark, still, whole. Nothing drifts until a region is woken, which is what makes the first click feel like striking a match rather than adjusting a slider.
* Light spreads from the exact pixel you hit
A click stores its own UV as that region's bloom origin, and a front expands outward from it. Each particle joins the flow only once the front reaches it, so the region dissolves into motion progressively instead of switching on all at once.
* Every region fills in the same time
The front is normalized by the distance from the click to the farthest pixel of that region, measured at click time. A tap on the moon and a tap on the whole sky both finish their bloom in revealDuration, so small parts never feel instant and large ones never feel slow.
* The flow field comes from the pixels
Only the region split is authored. Brushstroke direction and coherence are computed at load with a structure tensor over the luminance field, so the drift follows Van Gogh's actual strokes rather than a hand-baked flow texture.
* Dither decides who exists
Floyd-Steinberg error diffusion in linear light picks which pixels become particles, so particle density is proportional to brightness: the moon and stars are dense, the night sky is sparse. Each particle keeps its original canvas color.
* Only coherent strokes move
Particles below the coherence threshold hold still, anchoring the painting even inside a woken region. Strong strokes cycle through staggered drift lifecycles (fade in, S-curve drift along the stroke, fade out), with wind gust noise traveling along the flow direction.