Generative Geometry
Toroidal Vector Field
A toroidal flow field of 90 short streaks that wrap at every edge; the pointer or arrow keys push nearby streaks away and light them ochre.
canvasmedium complexitymoderate motionpointeraccessible
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
1
When to use it
Generative-geometry hero tiles, flow-field demos, or ambient panels where a wrapped vector field with a steerable focus point reads as live telemetry.
When not to
Light-only pages (the dark ground is hardcoded), and layouts where 90 moving streaks would compete with body text.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change the highlight from ochre to another register by editing --fc02-accent in :root and the matching excited stroke colour in render(); change field density by editing the particles length (90) and trail length (p.vx * 6). Keep the .fc02-canvas keyboard handler (arrow keys move the focus point) and the aria-disabled guard.
Safe to edit
- highlight colour (--fc02-accent and the excited strokeStyle in render())
- streak count (particles length 90) and trail length (p.vx * 6)
- field speed (time += .008) and push radius (100)
- ground and text tokens (--fc02-bg, --fc02-text)
Keep intact
- demo-v1 preview lifecycle: initialize demoEnabled from window.__foreverPreview and stop attract work on the window forever:interactive event; retain manual feedback, settling, cleanup and explicit sessions
Known limitations
- State remains local to each mounted instance; format/theme remount preserves takeover, not component values.
More Generative Geometry components
- Voronoi Shatter14 drifting sites partition the canvas into cool-blue Voronoi mosaic cells; moving the pointer nudges the nearest site toward the cursor.
- Auto-MazeDepth-first maze carves itself wall by wall on a dark grid. Walls are flat blocks of colour (3x3 cells each, one solid colour per block, no gradient) from…
- Truchet Tiles8x8 grid of six-colour quarter-arc Truchet tiles that flip orientation in slow sine waves, weaving shifting interlocked curves across a dark background.
- SpirographA hypotrochoid spirograph traced progressively on canvas with a shifting hue; each cycle completes then resets with new random radii and color.
- L-System PlantAn L-system fractal plant grows branch by branch from the canvas bottom, swaying gently; clicking triggers a wobble and regrows a randomized plant.
- Rotating Mandala12-fold mandala of 5 nested polygon rings that counter-spin, breathe in scale, and cycle through lilac-gold hues. Tap adds a spin impulse.