Reversing Hexagon Spirals
Five outward spirals radiate from a single centre, each tracing a hexagon that expands step by step. The curvature of each spiral slowly oscillates — clockwise tightens, then unwinds through straight-radial, then curls counterclockwise, then unwinds again and reverses — so the spirals breathe between handedness in a continuous, hypnotic cycle.
Interactive Demo
How It Works
Instead of seven nested hexagons chasing inward, this variation uses five outward-expanding hexagon spirals that all begin from a single centre point.
Outward expansion with rotation
Each spiral starts from a tiny seed hexagon at the canvas centre. At every iteration the hexagon is:
- scaled up by a small constant factor (~2.6 % per step), pushing it outward,
- rotated by a curvature angle that varies over time.
A positive curvature angle rotates each successive hexagon clockwise relative to the previous one, producing a clockwise outward spiral. A negative angle produces a counter‑clockwise outward spiral. When the angle is near zero the hexagons march outward in nearly straight radial lines — the spiral “unwinds.”
Curvature oscillation
The curvature angle follows a smooth sine wave with a period of about 14 seconds:
curvature(t) = maxAngle × sin(2π·t / period + phaseOffset)
- The angle decreases toward zero → the spiral loosens, becoming more radial.
- It crosses zero → the handedness reverses (clockwise ↔ counter‑clockwise).
- It increases in the opposite direction → the reverse spiral tightens.
- Then the cycle repeats in the other direction.
Because each of the five spirals has a different phaseOffset, at any instant some are curling clockwise, some counter‑clockwise, and some passing through the radial “straight” state.
Colour
Each spiral has its own base hue (stepped by 72° around the colour wheel). Within a spiral, hue shifts with iteration depth, edge index, and time. Saturation pulses gently and lines further from centre are darker, giving the pattern a sense of depth.