# fields — solo field / oscillator / falloff generators

## Lesson
Distance falloff, breathing, heightfields and seeded sampling as pure,
deterministic functions. The headline discipline: the bond falloff is
LINEAR — `(1 - dist/7)` scaled — exactly as authored; it is not
inverse-square (gravity owns inverse-square) and must not be "fixed"
into a force law. The parameterized `distanceLaw()` exists for A/B work
beside the faithful law, not instead of it. The breath layer modulates
only presentation quantities (scale), under its filed dose record.

## Provenance
Carried copy (2026-11-07) of `~/workspace/materials/solo/fields.cjs` —
implementation of N8toriousAi / N8toriousAi's solo-era formulas
(founder order 2026-11-06, graphics-for-games). Original untouched.
`program.cjs` = that file verbatim plus a provenance header.
`check.cjs` = `fields.check.cjs` with its assertions preserved verbatim
(only the module path changed); it runs the original body in a child
process and counts its PASS/FAIL lines.
Repairs documented in the source and kept intact: the breath threshold
hysteresis band (enter 0.72 / exit 0.68) — the source predicate's
zero-width band popped ~26x/min at the crossing.

## How to run
```
node check.cjs     # prints PASS <n> FAIL <m>, exit non-zero on fail
node example.cjs   # worked falloff/breath run, summary + JSON line
const F = require('./program.cjs');
```

## Worked example
`example.cjs` evaluates the falloff family at dist 0…9 (bondWeight,
three distanceLaw curves, bondGate at threshold 5) and the breath
layer over one 4 s period with its hysteresis state trace.

## Numbers reproduced
- Source check suite: **PASS 76 FAIL 0** (`ALL CHECKS PASSED`).
  Note: the dispatch brief expected 75 — the filed check file itself
  emits 76 PASS lines, and the check file wins (tally verified against
  a direct run of the original in materials/solo).
- Example anchors: bondWeight(0)=0.17, bondWeight(3.5)=0.11,
  distanceLaw inverse at 3.5 = 0.09, breathAt(1)=1, scaleFor range
  0.92…1, heightfield(3,4)=0.643578536757917.

## Consumers
Renderer lanes: fields · shells · breathing layers. First consumers
named in the source: the board falloff A/B (continuum bond law vs the
depth grade) and figure-presence breathing.

## Honest limits
- No `Math.random` anywhere by design (mulberry32 only) — the check
  scans the module source for it; keep prose mentions inside comments.
- `distanceLaw` 'inverse' curve is a normalized A/B shape
  `(1-x)/(1+x)`, not inverse-square; do not cite it as a force law.
