← f_ notebook · Mirrors · ∇ Fields

f_vf_repulse, live ​

Turns any texture into a repulsion vector field: 16 ring samples per pixel push away from bright regions. Choice of four accumulation modes.

The cell below steps the NumPy mirror that f_vf_repulse'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_repulse · NumPy mirror (Pyodide) · not the Max patch
Downloads about 15 MB the first time (Python and NumPy).
  • gain scales the field magnitude; negative values attract instead of repel.
  • reach is the ring sample radius in normalized UV; larger rings push from farther away.
  • threshold sets the luma level above which a region repels; negative values repel from dark regions.
  • mode picks how the sixteen samples combine: cancel (opposing pushes neutralize), max (strongest sample wins), abs add (magnitudes reinforce), turbulent (curl injected in stagnation zones).
  • view picks the display: hue-arrows (vec) or field strength as gray.
  • disp gain scales the arrow display only (both the vec and the magnitude views), not the field math.
  • The source select switches between color bars (color) and rings (geometry).

reference doc · patcher · vf_repulse_mirror.py

← Lucas KanadeVortex →