Recursion

Hevey · 2021 · Factory

On a black ground, dense clusters of tiny nested rectangles in red, mint green, and white pack together like a fragmented circuit or city map. A few larger solid blocks—one bright red square, one mint bar—punctuate the teeming detail. A slight chromatic-aberration shimmer edges the forms, suggesting digital subdivision and recursive partitioning.
Hevey · via Art Blocks ↗ · © the artist
Sample output of Recursion
Hevey · via Art Blocks ↗ · © the artist
Sample output of Recursion
Hevey · via Art Blocks ↗ · © the artist
Sample output of Recursion
Hevey · via Art Blocks ↗ · © the artist

Recursion is a generative art project whose concept is recursion. Each variation starts with a block which is irregularly divided into smaller blocks, which are then divided into smaller blocks, which are then divided into smaller blocks, etc, based on a defined depth (to better visualize this concept, take a look at https://hevey.art/blog/recursion-concept). In this project, even the script is recursive! The script is able to generate a large number of variations and each of these variations is then able to generate its own variations (keeping the same properties) with a single click on the image.

How it works

The core is recursive region division. It divides one block into uneven smaller blocks, divides each of those into smaller blocks, and so on, recursively subdividing to a fixed depth. Each rectangle makes a nested filling pattern by dividing its extent into a pair of divisors (rows × columns) and packing them in a grid (class K). The depth and density of division and the palette are decided by hash-derived parameters, and the composition's format (centred, quartered, etc.) also switches according to the hash. With recursion itself as the theme, it generates at every point from combinations of rectangle groups that change with each subdivision.

Palette

From the generator script · 101
#000000#b4b4b4#c8c8c8#e1e1e1#d2d2d2#aaaaaa#646464#3d2d01#5bd1d7#348498#004d61#dd0a35#e4d1d3#1687a7#014955#2c323b#494e56#fd7013#eeeeee#525252#ca3e47#414141#313131#de4307#f29c2b#f6d04d#8bc24c#001871#41b6e6#ebdcbb#be9b37#807859 +69 more
Extracted from outputs · 8
#6c332c#0a0909#23434d#558079#b96e2d#0390da#c5ffee#db147f

Algorithms

Details

Tools
p5.js
Runtimes
Browser (Canvas / 2D), On-chain Deterministic
Movement
Long-form Generative Art
Medium
On-chain generative edition
Relations
released-on (2021-10) → art-blocks
Script hash
613e7d7dfc363c9fc1f2273e93b941a7faeb92bdcfc01e5131020bb3d95d5c1e
On-chain
ethereum · 0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270 · #192

View generator ↗ · Art Blocks ↗

Sources

Related works (by shared algorithms)

Diggly Collects All
dca · 2025
send/receive
snowfro · 2025
Cytographia
golan-levin · 2024
Flows
ryley-o-eth · 2023
Glasshouse INAT
aleksandra-jovanic · 2023
Neural Sediments
eko33 · 2023
Alien DNA
shvembldr · 2022
Ancient Courses of Fictional Rivers
robert-hodgin · 2022

Last updated 2026-07-16