← f_ notebook · docs/f-reference/f_vf_vortex.md

f_vf_vortex ​

Type: Generator (f_vecfield producer) Status: Complete


What it does ​

Generates a single fixed-point vector field encoded as an f_vecfield texture — float32, RG = XY direction, 0.5 = zero vector. The field topology is continuously variable between sink, spiral sink, center (pure rotation), spiral source, and source via two independent params.

Output is intended for f_vecfield consumers. Also compatible with vs_displacement as a dumb two-channel texture.


Signal Flow ​

in0 (control only; the module renders on its own `r draw`, no driving texture) → params route to dials → vortex_pix
in1 (cx mod texture, optional)          → vs_inState → vortex_pix
in2 (cy mod texture, optional)          → vs_inState → vortex_pix
in3 (convergence mod texture, optional) → vs_inState → vortex_pix
in4 (curl mod texture, optional)        → vs_inState → vortex_pix

vortex_pix (@type float32) → out0

Parameters ​

ParamRangeDefaultDescription
cx0–10.5Fixed point X position
cy0–10.5Fixed point Y position
convergence-1–10.5Inward pull. 0=none, >0=sink, <0=source
curl-1–10.0Rotation. 0=none, >0=CCW, <0=CW
falloff0–102.0Exponential decay rate. 0=uniform field
cx_amt0–10.0cx modulation depth (inlet 1)
cy_amt0–10.0cy modulation depth (inlet 2)
convergence_amt0–10.0convergence modulation depth (inlet 3)
curl_amt0–10.0curl modulation depth (inlet 4)
bypass0/10Native bypass: passes the input through (inlet 0 to the outlet)

Prefix: vf_vortex — Object name: vf_vortex_pix


Field Encoding ​

f_vecfield convention: R = fx * 0.5 + 0.5, G = fy * 0.5 + 0.5, B = 0.5, A = 1.0. Consumers decode via (sample - 0.5) * 2.0.

Modulation inlets decode the same way: (sample.x - 0.5) * 2.0 * amt added to the base param value. A texture at 0.5 gives zero offset, but an unconnected mod inlet does not: with its *_amt > 0 the base param is offset by -amt (seen live, Matt, 2026-11-06; not yet gated in the codebox, to be fixed later). Leave *_amt at 0 for any mod inlet you do not connect.


Field Topology Reference ​

convergencecurlTopology
> 00Sink
< 00Source
0≠ 0Center (pure rotation)
> 0≠ 0Spiral sink
< 0≠ 0Spiral source

Notes ​

  • Off-screen fixed points (cx/cy outside 0–1 via modulation) are valid — field computes cleanly
  • Falloff uses exp(-r * falloff) — always positive, no ring artifact
  • See docs/f-reference/f_vecfield_type.md for full type contract