← f_ notebook · Mirrors · ∇ Effects

f_vf_advect, live ​

Fluid-style advection: the source is washed backward along a vector field frame by frame, leaving spreading trails.

The cell below steps the NumPy mirror that f_vf_advect's tests are written against, in your browser. It is the NumPy mirror, not the Max patch, and it is not claimed to match the patch bit for bit.

f_vf_advect · NumPy mirror (Pyodide) · not the Max patch
Downloads about 15 MB the first time (Python and NumPy).
  • Input source picks the texture carried by the flow (a moving image at the start).
  • Second input picks the vector field the flow follows (a swirl at the start).
  • dt is the displacement step per frame (in texture units, 0 to 0.2 — the Max dials top out lower but the mirror accepts this range): larger values move the flow faster.
  • decay sets frame retention: below 1 the trails fade, near 1 they persist, above 1 they amplify.
  • injection is how much source bleeds into the flow each frame.
  • gain scales the accumulated flow before the wet/dry blend.
  • mix is the wet/dry crossfade between the raw source and the advected flow.
  • trail multiplies how long the fade takes (stretches the same decay over more frames; 0 is the classic loop).
  • view shows the composite output, the advected result before the mix, or the flow-field gradient.
  • Clear resets the feedback state to black.

reference doc · patcher · vf_advect_mirror.py

← Vortex MultiCaustic →