Implementation
Sometimes you want the grid to forget the usual eight neighbors and listen only to a horizontal triplet—west, you, east. If at least two of those three are on, the cell lives. Spread across a wide, slightly letterboxed field with soft random colors and you get banded, almost woven motion: less "creatures" and more slow interference across the frame.
Breakdown
This is a totalistic 1D rule smeared across 2D rows: each row evolves independently in terms of its left/center/right samples. There are 3 key components:
Three-cell sum
The Moore count is ignored; only west, currentActive, and east matter. Sum ≥ 2 means alive next step.
const sum = west.add(currentActive).add(east)
If(sum.greaterThanEqual(2), () => next.assign(1))That local law is easy to reason about but produces surprisingly organic horizontal striations once the field is seeded randomly.
Wide aspect
288 × 160 exaggerates the cinematic aspect; combined with scaleX / scaleY framing, the CA reads more like a strip monitor or film strip than a square petri dish.
Random pastels
useMemo builds a soft foreground in the mid-high range and a dark, muted background so each visit feels like a new dye lot—same structure, different gallery lighting.
Because rows only talk left-right within a row, you can read this sketch as many parallel 1D CAs stacked vertically, all evolving at once.






