← f_ notebook · ideas/field_object_bridge.md

Field and object: the bridge, starting with emergent objects ​

Status: ⚪ concept only. Captured 2026-11-28 (Claude offline, docs only) from a conversation with Matt that began with "PDEs versus waveform generators" and moved to "what if we are not talking about fields?". Nothing here was built, run or tried in Max. Matt chose the organizing principle (by the bridge) and the starting point (emergent objects); he has not decided on any module.

Sourcing. Repo facts come from docs/f-reference/module-inventory.md (read in full today), ideas/f_cgl.md, docs/f-reference/f_cgl.md (outlet lines only), ideas/f_nematic.md, ideas/f_nematic_sphere.md (defect lines only), ideas/discrete_item_family.md and ideas/f_vf_seeds.md (heads), ideas/axes_of_investigation.md and ideas/phenomena_survey.md (read), and docs/max-reference/jit_fx_vs_ideas.md (head). Physics and mathematics claims are from memory and marked (external); none was looked up. Items worked out rather than observed are marked (inferred).

Overlap check ​

  • axes_of_investigation.md (2026-11-27) covers a different question: what kind of phenomenon is it, and where in the world-to-percept chain. This note adds one more axis it does not have: what the primitive is (a value at every position, or a countable thing with an identity). Its closing prompt on missing axes names "scale", which is nearby but not the same.
  • phenomena_survey.md lists phenomena to emulate. It does not discuss reading objects out of a running field.
  • discrete_item_family.md frames f_grain, f_masonry, f_weave and f_vf_seeds as fields of discrete items, set by arrangement topology. Those items are authored or hashed. The items in this note are emergent: nobody places them. That is the new part.
  • Built and relevant: f_cgl (a self-sustaining phase field with defects, and its outlet 2 is A itself, zero exactly at a defect core, per its doc), f_nematic (comet-shaped +1/2 defects that self-propel, nucleate and annihilate, per its inventory row), f_vf_ch (droplets that coalesce), f_chladni (outlet 2 is a gradient toward nodal lines), f_vf_lbm (an obstacle mask is an object that forces a field), f_vf_stamp (a press injects ink and impulse).
  • Nothing in the inventory reads discrete objects back out of a field. Several modules produce defects, droplets and nodal lines; none outputs where they are, how many there are, or what charge they carry. That gap is the subject of section A.
  • f_cgl already parked a defect-marks outlet (.specify/f_cgl/spec.md D11 and User Story 6, T055; found 2026-11-28, after this note was first written). D11's argument is that thresholding |A| already marks cores and f_vf_seeds can take it. A NumPy winding counter also already exists (defects() in tests/modules/cgl/cgl_mirror.py and ideas/f_cgl_spike.py), and the f_cgl regime map's defect counts come from it. So what this note adds is not "mark the cores" but sign (charge), a count with a conservation check, and a reader that also works on f_nematic; f_defects_spike.md tests whether that is worth a stage.

The idea ​

Many systems can be described two ways. The field view is a value at every position. The object view is a list of things with positions, a kind, and a lifetime. A field system often contains an object system inside it: the objects are what the field's structure is made of. The bridge has three directions, and the library covers them unevenly.

DirectionMeaningIn f_ today
A. Field → objectsfind the emergent things in a running fieldproduced everywhere, read out nowhere
B. Objects → fieldsplat, force, obstruct or injectpartly: f_vf_stamp, f_vf_lbm mask, f_caustic splats
C. Both ways at onceagents in a flow, active matter, chemotaxisnot seen
D. Objects with no fieldgraphs, grammars, integer structurenot seen (section D, unwritten)

Where this sits: upstream of presentation, or connected? ​

Added 2026-11-28 after Matt asked whether the field/object primitive sits upstream of the presentation and surface effects applied downstream. Interpretive (Claude, offline); nothing here was tested.

Short answer: both. It is partly upstream and mostly connected.

  • The upstream reading. Field versus object says what the source system is made of: a PDE solver is a field, a defect gas or a particle swarm is a set of objects. That is settled before any look is applied, and in the chain of axes_of_investigation.md (matter and dynamics → light → camera → medium → display → percept) it mostly lives at the first stage.
  • Why it is not only upstream. It is a different kind of axis from the chain. The chain says where in the process something sits; field versus object says how it is represented, and that choice recurs at every stage. So it is a representation axis that crosses the chain, not a stage in it.
  • Presentation effects are often object systems. Halftone dots, stipple, grain, pixels and scanlines are discrete marks. f_halftone, f_stipple, f_grain and f_vf_seeds turn a continuous image into objects, which is bridge direction A (field → objects) used as a presentation effect. Per the inventory, the medium and display stages are where this is most visible.
  • Rendering objects is bridge direction B. Once there are defects, particles or a graph, drawing them means splatting, stroking or glyphing them into pixels. For an object system that drawing step is the presentation layer and where the look is decided; for a field system the render is nearly trivial.
  • A downstream effect can change the primitive, not just the style. Halftoning an f_cgl look turns a field into dots. That is a conversion, and it can feed another stage that wants objects (a glyph renderer, a mark placer) as easily as it feeds a display.

So the picture is a loop, not a one-way line: a source can be a field or a set of objects, and presentation effects are themselves conversions between the two. This note is closer to a vocabulary for those conversions than to a pipeline stage.

The test, run on paper (Claude, offline, 2026-11-28; Matt asked for it). I added field/object columns to the placement table of axes_of_investigation.md in conversation only; that note is unchanged. Placements are inferred from the inventory rows, docs/f-reference/f_halftone.md (head) and ideas/f_mosh.md (head), not from Max. f_stipple was not in the axes table and was not placed. A texture is always stored as a field, so one column was not enough. The check used two: what the output reads as, and whether readable objects sit inside the dynamics.

Row (from the axes table)Input → output reads asObjects inside, readable?Differs from the existing axes?
Analog video synthesisfield → fieldnoneno
f_lensfield → fieldnonesplits from f_caustic
f_causticfield → fieldyes, transient: a lattice of points is splatted along the field (per its inventory row)splits from f_lens
f_ksfield → fieldweak: cells, ridges, "spiral-ish defects"no
f_wcfield → fieldnone that I know ofno
f_vf_fluidfield → fieldpossible coherent vortices, unreadno
f_halftonefield → marks (dots, lines)the marks are the outputyes
f_vf_erodefield → field (ink thickness is continuous)noneno
f_mosh (idea)field → blocks (chunks with their own motion)per-block identity, as the note describes ityes
f_cglfield → fieldyes: phase defects with a conserved chargepartly

What it showed:

  • The guess above was half right. f_halftone moves (field → marks) but f_vf_erode does not: its ink thickness is a continuous field. The medium stage is not uniformly object-like.
  • The new axis splits two pairs the old axes grouped. f_lens and f_caustic share all four existing axes, and f_halftone and f_vf_erode share a chain stage. The field/object reading separates both pairs, so it carries information the existing eight axes do not.
  • The emergent rows read the same on output but differ inside. f_ks, f_wc, f_vf_fluid and f_cgl all read as field → field. Only f_cgl (and f_nematic) hold objects with a conserved charge that could be counted, which is section A.
  • It is not redundant with axis 1. Objects inside appear in emergent rows, but f_halftone and f_mosh are derived sources with object-like output. Whether derived fields with singular points also count (open question 5) is untested.
  • Caveats. f_mosh is an idea note, so its row rests on the note's description of block-wise motion. Two calls are arguable: f_ks as "weak", f_wc as "none".

A. Field → objects: emergent objects ​

What kinds of object a field produces (external, from memory) ​

ObjectLives inWhy it counts as a thing
Point defect, phase fieldcomplex field (CGL, f_cgl)integer winding number ±1 around it; cannot be removed locally
Point defect, line fielddirector or tensor field (f_nematic, f_tf_*)winding ±1/2; the +1/2 "comet" self-propels in active nematics
Singular point, vector fieldany vecfieldindex of the zero (source, sink, center, saddle); Poincaré-Hopf ties the sum to the domain
Spiral tipexcitable media (f_excitable idea)where two isolines cross; the object a spiral wave rotates around
Localized spot or pulsereaction-diffusion (f_gs, f_swift ideas)can persist, split (self-replicate) or die; has a birth and death
Droplet or domainphase separation (f_vf_ch)coarsens by merging; area and count are meaningful
Coherent vortexflow (f_vf_fluid, f_vf_lbm)negative Okubo-Weiss region; a long-lived swirl
Nodal lineresonance (f_chladni)zero set of a mode; where sand collects

What makes defects the best first case ​

  1. They are conserved and countable. Defects of a phase or director field carry a topological charge. They are created and destroyed in opposite-charge pairs, so the total charge changes only at a boundary. On a periodic grid (a torus) the total is zero; on a sphere a line field must hold a total of +2, which is the "minimum four +1/2 defects" fact already in f_nematic_sphere.md. (external) Charge gives a rule for a performer to see: pairs appear, pairs vanish, nothing else.
  2. They interact like particles. Opposite charges attract and annihilate; like charges repel; +1/2 nematic defects self-propel. (external) So a field with defects is a particle system with its own physics, and the field solver already computes it.
  3. A cheap local detector exists (observed, below). For a phase field, sum the wrapped phase differences around each 2×2 loop of texels and divide by 2π; a nonzero result marks a defect and its sign is the charge. That is four gathers per pixel in a pix stage, with no scatter. Observed 2026-11-28 (f_defects_spike.md): a crossing-count version of this loop, with no atan2, matched the winding reference exactly on f_cgl outlet 2 as encoded, and also on both f_nematic tensor outlets with no half-angle step (the packed outlet is already the angle-doubled field, so the loop gives ±1/2 directly). It matched a GPU pix stage texel for texel. Noise near cores did not produce false loops in those runs.
  4. The render choices are many and cheap, which is the point: once the defects are a mask or a list, the image is a design decision rather than a by-product.

What to do with a readout (the bridge is only useful if something is on the other end) ​

UseHowReuses
Mark themdefect mask, signed by charge, drawn as a glyph, ring or huef_vf_seeds takes seeds and shapes; f_tf_glyph is a renderer for a tensor field
Make them sourcesa defect injects ink or an impulse into a fluid or advected layerf_vf_stamp, f_vf_fluid, f_vf_advect
Count themdefect density as a 1×1 float, then a control signaljit.fx.an.mean outputs a 1×1 texture (per jit_fx_vs_ideas.md); f_lfo shows a 1×1 float32 texture is already a convention; f_util_profile is a CPU-side reduction precedent
Track themgive each defect an identity across frames, so it can leave a trail or have a namenothing; hard on a fragment shader (inferred); a CPU js stage is the usual route
Show their statisticsdefect count against time, nearest-neighbor distance, charge balance, drawn as a scopeideas/audio_inspired_visual.md style scope modules, not read

The cheapest useful version is probably mark them + count them, which needs no tracking and no CPU readback.

Why this matters beyond a new module ​

  • It turns the library's emergent generators from look modules into sources of events. A defect annihilation is a discrete, audible-sized event that falls out of the physics; today a performer can see it and nothing can respond to it.
  • It makes f_cgl, f_nematic and f_vf_ch more alike than they look. They share an interface (a field with objects in it), and a single reader might serve two or three of them.
  • The reverse direction is already half-built, so a loop closes: f_vf_stamp injects at a point, f_vf_lbm takes an obstacle mask. A defect reader on one side and an injector on the other would let a field's objects drive a second field.

Counter-cases and honest limits ​

  • Charge is clean only where the field is smooth. A noisy or under-resolved field gives spurious loops and misses pairs closer than a texel. The f_cgl doc warns that phase is undefined at a core, which is also where the detector lands.
  • Not every object has a cheap detector. Counting droplets needs connected-component labeling, which a fragment shader cannot do; local maxima are a stencil and may be good enough (inferred).
  • A filtered view is not new physics. Marking defects on an f_cgl look adds no dynamics; the value is in what the marks are fed to.
  • Identity is the expensive part. Everything under "Track them" assumes a CPU stage and a small per-frame match; its cost and latency are unmeasured.

B. Objects → field (stub) ​

A set of objects becomes a field by density (splat and accumulate; f_caustic already scatters into a float32 capture), by force (each object pushes the field; the f_vf_vortex_multi three sites are the smallest case), or by obstruction (f_vf_lbm mask). Chladni sand is the classic case: particles slide down the nodal gradient into the lines, and f_chladni outlet 2 is already that gradient, so a particle layer pushed by it through f_vf_advect might approximate the figure (inferred, not tried). Not developed further here.

C. Both ways at once (stub) ​

Agents that read a field and write one: chemotaxis (slime-mold-style trails), tracers in a flow, bubbles, active matter where the objects are the stress source. Active nematics (f_nematic) is already this, but with the objects implicit. Not developed.

D. Objects with no field (stub, unwritten) ​

Graphs, grammars and rewriting, integer and sequence structure, point patterns, curves, packings, transport between distributions. These have no field to read out of, so the rendering step (splat, stroke, layout, index map) is the whole design. The earlier conversation's table of primitives is the starting list; it would be written as its own section after A is settled.

Open questions ​

  1. Is a defect reader one module that serves several sources, or a stage inside each source module? A stage per module would multiply cost; a shared reader needs a shared input contract (f_cgl outlet 2 is an A vecfield; f_nematic gives tensors). Evidence from f_defects_spike.md: the identical detector worked on both with no per-source change (packed tensor R, G is already the angle-doubled field), which favors one shared reader. Answered 2026-11-29: yes. f_cores is that shared reader and reads f_cgl, f_nematic and any vecfield through one contract (docs/f-reference/f_cores.md).
  2. Marks only, or count and marks? (Partly answered 2026-11-29.) f_cores v1 ships marks only (two texture outlets); a count is the next module-sized step (cores_next_steps.md item 3), and the spike found the count differs by regime, so it is worth having as a control signal.
  3. Tracking: needed or not? (Not needed so far.) Nothing built or looked at needed defect identity; the marks and a count cover what Matt's looks asked for. Unmeasured: a CPU tracking stage.
  4. How faithful to the topology? A detector that is exact on a clean field and noisy near cores may be fine for a visual module; it is a taste call, in the sense of axis 6 in axes_of_investigation.md.
  5. Does defect reading also work on non-emergent sources (a derived vecfield from video, via f_vf_lk, or f_tf_tensormap's structure tensor)? Singular points of a derived field are the same objects. That would move the idea from "emergent" to "derived" on axis 1. (Matt, live: "interesting"; not examined. cores_next_steps.md item 1, optional.)
  6. Is field versus object a ninth axis, or a reading of the existing ones? The paper test above says it separates rows the existing axes group (it split two pairs), and that it needs two columns: what the output reads as, and whether readable objects sit inside. If it is an axis, it is the first one in axes_of_investigation.md that is about representation rather than origin, process or taste. Not yet added to that note; Matt's call.

A smallest spike (proposed; now written up as f_defects_spike.md) ​

One pix stage that takes the f_cgl outlet 2 vecfield, decodes the phase, sums wrapped phase differences around each 2×2 loop and outputs a signed mask, patched beside f_cgl in a scratch patch. Looks to check: do marks sit on the cores, do they appear and vanish in pairs, and what do they do at the periodic edge. Costs no bench, and the first look is Matt's. Matt's go needed before anything is built; this belongs next to f_cgl's open T042 (outlet 2 into a consumer), of which it is one possible answer.

axes_of_investigation.md, phenomena_survey.md, discrete_item_family.md, f_cgl.md, f_nematic.md, f_nematic_sphere.md, f_vf_seeds.md, vector_field_math_concepts.md (singularity index), docs/f-reference/module-inventory.md.