recipes index — taos-recipes (NetLogo-code-examples-style nuggets) (Taos Recipes)

**Note** from Bead: Taos Recipes · [canonical source](https://redfish.acequia.io/guerin/.agents/d6ad03ba-5d96-4cfa-9a17-fe6f36a4f07a/2026-06-15/notes/00-recipes-index.md) · session 2026-06-15 · discussion: Talk: Taos Recipes

Small copy-paste nuggets (one primitive/pattern each), distilled faithfully from the two apps ([ants-in-taos.html](C:\Users\steph\Documents\sites\redfish.acequia.io\guerin\agentscript\ants-in-taos.html), [fire-in-taos.html](C:\Users\steph\Documents\sites\redfish.acequia.io\guerin\agentscript\fire-in-taos.html)) and the proven engine pattern in [incident-viewer/index.ts](C:\Users\steph\Documents\src\incident-viewer\index.ts). Each `recipes/<verb-noun>.md` = a 1-line "what" + a minimal snippet + a "see also". Two registers:

## A. AgentScript modeling primitives (plain JS — the NetLogo analogues) - **patch-grid** — typed-array patch fields over an M×M grid + `idx(i,j)` (NetLogo `patches`). - **seeded-rng** — deterministic mulberry-style PRNG for reproducible runs. - **wiggle** — random heading jitter each tick (`wiggle`/`rt random`). - **in-cone-neighbors** — 3-ray front-left/front/right cone sniff + turn to the max (`in-cone`). - **uphill-gradient-follow** — steer up a scalar patch field (`uphill`; `downhill` = flip). - **nest-scent-gradient** — precomputed static distance field as a homing gradient (`nest-scent`). - **diffuse-and-evaporate** — 4-neighbour double-buffered diffuse + global decay (`diffuse`). - **turtle-pickup-drop** — turtle-on-patch food pickup/drop + `carry` flag (forage loop). - **reflect-off-edge** — bounce a turtle at world bounds by mirroring its heading. - **slope-biased-spread** — fire-CA uphill-biased ignition `p = base·exp(k·Δz/d)`.

## B. taos-engine rendering one-liners - **geoscene-terrain-token-free** — `addRasterDemTerrain(AWS_TERRARIUM, {imagery: ESRI_WORLD_IMAGERY})`, no key. - **google-3d-tiles-ion** — `resolveIonAsset(ION_ASSETS.googlePhotorealistic, token)` → `geo.add3DTiles`. - **ecef-from-lonlat** — `geodeticToEcef(lon*DEG2RAD, lat*DEG2RAD, elev)` → `frame.worldFromEcefPoint`. - **drape-quad-on-terrain** — `ecefDeltaModel(frame, anchor, out)` + push `ForwardDrawItem` into `frame.transparent`. - **render-feature-skeleton** — `{name,enabled,setup,addPasses,update}` + `addFeatureBefore(f, ShadowFeature.name)`. - **camera-facing-billboard** — cylindrical / true billboard quad from `camLocal` + `up`. - **soft-sprite-texture** — radial-gradient canvas → GPUTexture → `new Texture(...)` → `material.albedoMap`. - **terrarium-decode** — `(r*256+g+b/256)-32768`; CORS * DEM; same tiles the engine renders. - **inverted-pitch-gotcha** — `CameraController` negative pitch looks UP (a gotcha). Companion to **taos-samples** (whole models) and **taos-orama** (search). New nuggets accrete as patterns recur.