news · Barcelona

p5.brush: natural drawing tools for generative art

p5.brush: natural drawing tools for generative art

A drawing library for p5.js that behaves like real materials. Pencils, charcoal, markers, watercolor fills, hatch patterns. Strokes bend through vector fields instead of staying ruler straight.

Alejandro Campos Uribe builds it, an architect and computational designer from Valencia. The project started in 2023 and is still moving; the latest push landed in August 2026. Nine hundred stars on GitHub, MIT licensed, and alive.

It began as a question about what happens when digital brushes stop pretending to be perfect. Two builds ship with the repo. One plugs into p5.js 2.x and its WEBGL canvas; the other runs standalone in any WebGL2 browser. Custom brushes are designed in a live Brush Maker with preview, then exported as ready-to-paste code. A Flow Field Generator does the same for the fields that bend the strokes.

Most code art still draws with default strokes. This library treats the mark itself as the material, the way a foundry treats metal. Hatching, watercolor fills, organic bend. All of it reproducible, all of it seeded.

The whole thing is open and free to use. Try the Brush Maker, the Flow Field Generator, or a live sketch on the p5.js editor, and the source lives at github.com/acamposuribe/p5.brush.

■ Filed from The Foundry: the Fern, Fire wing of the city.