What a hand leaves when it drags through what burned.
A sibling of #37 Stokes, in grey. A few broad strokes are dragged across the plate at their own angles, and the ash inside them turns to fibre along the drag. Their edges crumble, their tails run dry, flakes catch pale and pit dark, and here and there an ember still glows. Play it and the fibre runs on along the flow and the embers flicker.
The fibre is line integral convolution: white noise smeared along a vector field. Inside a stroke the field follows the stroke; everywhere it is troubled a little by the curl of a slow noise, which has no sources or sinks, so the fibre swirls without pooling.
The flow
javascript·ash.js
// the curl of a noise potential: divergence-free, so it swirls and never pools
const curl = [dpsi_dy(u, v, t), -dpsi_dx(u, v, t)];
// inside a stroke the flow follows the stroke, bending with its centre line
const flow = normalize(add(scale(strokeTangent, mask * 1.6), scale(curl, 0.35)));
The fibre
javascript·ash.js
// line integral convolution: walk the streamline both ways, averaging the noise under a
// rippling window; the ripple moving along the line makes the fibre seem to run
for (const dir of [1, -1]) {
let p = pixel;
for (let s = 1; s <= 12; s++) {
p = add(p, scale(flow(p), dir));
const k = (0.5 + 0.5 * cos(PI * s / 12)) * (0.6 + 0.4 * sin(s * dir * 0.7 - phase));
sum += white(p) * k; weight += k;
}
}
const ash = mask * (0.14 + 0.66 * contrast(sum / weight) + fleck) + 0.1 * dust;
References
- Line integral convolution
- Curl-noise for procedural fluid flow, Bridson, Hourihan and Nordenstam, 2007
- Imaging vector fields using line integral convolution, Cabral and Leedom, 1993