Drawing with Code
yazid · 2023
A generative series by Yazid, written in p5.js and inspired by Matisse's "Blue Nudes." Struck by a photograph of a room hung with those simple, evocative cut-outs of the human form, Yazid renders figures as harmonious abstractions that share a common pose while diverging subtly from one another — the human body drawn, and varied, through code.
How it works
A single hand-authored figure outline (one of seven Matisse-like poses) is broken into strokes, each stroke inflated into a jittered, corner-cut "cut-paper" polygon whose thickness tapers with height; the shapes are filled, freckled with small colour patches and simplex-noise texture, then the whole print is aged with a burn-gradient discoloration and 50,000 grain specks.
Two engines are seeded from the token hash: an sfc32 PRNG (`Random`, two streams warmed 10⁶ steps) and a SimplexNoise field. The figure itself is not computed — `paths[]` holds seven hand-authored outlines (normalized point lists, each a continuous "Blue Nude"-style pose); `calculateFeatures` picks one by weighted index (the seventh, labelled "GM", is rare) and a style from {Classic 50%, Lino 20%, Cut Color 30%} that selects the palette (Matisse blue/red/green on paper, or a wider set) and background. `render` then: (1) `segmentPath` cuts the chosen outline into separate strokes at random break points; (2) `getPolyFromStroke` walks each stroke and offsets perpendicular points to inflate it into a filled polygon, with a thickness that tapers by vertical position (`e / map(y,0,1, ~1.9, ~0.6)`) and per-vertex jitter set by an "erraticness" value — the hand-cut edge; (3) `smoothPoly` rounds it by probabilistic corner-cutting (Chaikin-like, gated by `probSmooth`). Inside each shape, 5–15 `patches` — small 3–10-sided smoothed blobs with a white/black halo and a colour fill — and a simplex-noise `drawTexture` layer (soft-light/overlay blobs) are clipped to the stroke via an offscreen buffer and `globalCompositeOperation`. Lino style skips the patches/texture for a flat linocut look. Finally two global passes age the print: `drawGlobalDiscoloration` (Classic only) burns four edge gradients in `color-burn`, and `drawGlobalNoiseGrain` stamps ~50,000 tiny noise-modulated specks in `multiply`. The readable "features" report Style and a Roman-numeral Line. This decomposition is grounded in the actual on-chain generator script (sha-256 2a2bb7cd…, recorded above), not reconstructed.
Details
View generator ↗ · Art Blocks ↗
Sources
- On-chain artblocks.io ↗ — Art Blocks collection page (Drawing with Code, generative edition, 2023).
Last updated 2026-07-16