Fractals & Automata
Lenia
Lenia smooth-life automaton: glowing teal-to-cyan blobs drift and pulse on a dark field via a typed-array convolution sim scaled up with CSS.
canvasheavy complexitymoderate motion
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
Worth keeping?
Votes steer what gets built next — sign in to cast one, free to read
When to use it
Ambient hero backgrounds for science, generative art, or creative tech themes. Dark-mode showcases needing organic, living motion.
When not to
Low-end CPUs (toroidal convolution loop runs every frame). Contexts needing light backgrounds or legible text overlaid on the canvas.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change MU to 0.18 and SIG to 0.025 to shift blob behavior toward tighter, faster-pulsing clusters, and update the ramp stops to warm amber tones. Theme: dark tokens live in :root, the light variant in :root[data-theme="light"]; ?theme=light or a {type:'forever:theme'} postMessage switches at runtime.
Safe to edit
- grid size (N=96)
- kernel radius (R=12)
- growth params (MU=0.15, SIG=0.03, DT=0.1)
- color ramp stops array
- simulation rate (STEP=1000/22)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- IIFE wrapper
- prefers-reduced-motion guard (static settled frame)
- visibilitychange pause
- toroidal boundary wrapping in step()
- theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)
Known limitations
- O(N^2 x KLEN) convolution per frame — heavy on low-end devices at larger grid sizes
- Grid resolution fixed at 96x96; increasing N sharply raises CPU cost
- No interactivity — blobs cannot be steered or seeded at runtime
More Fractals & Automata components
- Mandelbrot ZoomEscape-time Mandelbrot set zooms slowly into a filigree boundary seam, rendered in smooth red-to-gold color bands on a near-black background.
- Julia MorphJulia set fractal whose complex constant traces a slow Lissajous loop, morphing green filaments between connected and dendritic forms over ~70 seconds.
- Game of LifeConway's Game of Life with glowing magenta cells aging through three color tiers; field reseeds automatically when population collapses.
- L-System FernA fractal fern draws itself branch by branch via an L-system grammar, coloring segments brown-to-gold by depth; it holds then restarts.
- Domain WarpSlowly flowing domain-warped fractal noise rendered in green, sage, and ink tones; layered fbm warp passes produce marbled smoke patterns.
- SierpinskiSierpinski triangle accretes from 26,000 chaos-game points, glowing red on near-black; recent points flash white-hot before cooling.