Generative Geometry
Penrose Aperiodic
Penrose rhombus tiling via recursive deflation, recoloured by a sine wave radiating outward in gold, rose, and plum. Pointer nudges wave; click pulses.
canvasheavy complexitymoderate motionpointer
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
Generative art hero sections, math/science landing pages, ambient dark-background displays where geometric complexity is the centrepiece.
When not to
Contexts requiring text legibility on top — the dense tiling and shifting colours compete with overlaid content. Low-end devices may stutter at depth 6.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change the accent colour from gold to electric cyan by replacing C_ACC=[212,175,106] with C_ACC=[0,220,210] and C_PALE=[233,221,201] with C_PALE=[180,255,255]. 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
- deflation depth (depth 5 or 6 based on viewport size)
- colour palette constants (C_BG, C_ACC, C_DEEP, C_ROSE, C_PALE)
- wave frequency and speed (nd*7.0, tt*2.2)
- tile scale radius (R = max(W,H)*0.62)
- pulse decay rate (pulse *= 0.95)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- IIFE wrapper
- prefers-reduced-motion guard (static frame at t=40)
- visibilitychange pause/resume
- DPR-aware canvas sizing
- theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)
Known limitations
- Depth-6 deflation generates thousands of triangles — may drop frames on low-end mobile
- No animated reduced-motion fallback beyond a single static draw
- Rhombus edges suppressed visually but triangles not merged structurally
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 with shifting hue; a bright dot marks the active cell. Resets with a new color on completion.
- Truchet Tiles8x8 grid of rainbow 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.