Modular Assembly / Parametric Character
Assembling images from a fixed set of recombinable modules is a core method of 1960s concrete/computer art — e.g. Manuel Barbadillo's modular units and Karl Gerstner's "programme" — with roots in combinatorial and serial design. Diffuse lineage.
community / folk Name — A descriptive category label, not a coined or eponymous name; no single coiner of the term is attested.
In one line Building characters or objects by probabilistically combining parts drawn from categorised sets (heads, bodies, arms…) at defined attachment points — the classic "avatar/robot generator" approach (e.g. Algobots).
The code
The actual sketch behind the demo above — sandboxed and reproducible. This is the whole thing.
modular-assembly/index.html
const SEED = Math.floor(Math.random()*1e9);
// Parametric character (Algobots-style): assemble a "robot" from categorical
// parts — head shape, eyes, antenna, body, arms, legs — each chosen
// probabilistically from small sets, in a pixel-art palette.
function setup() {
randomSeed(SEED);
const s = Math.min(windowWidth, windowHeight);
createCanvas(s, s);
const palette = random([
['#22303f','#e94f37','#f6e8ea','#44bba4','#e3b505'],
['#1b2330','#ff6b6b','#f7fff7','#4ecdc4','#ffe66d'],
['#2d2a32','#dd7373','#f5f5f5','#7494ea','#3aafb9'],
]);
background(palette[0]);
const metal = palette[2], accent = random([palette[1], palette[3], palette[4]]);
const accent2 = random([palette[1], palette[3], palette[4]]);
const u = s / 16; // unit
rectMode(CENTER); ellipseMode(CENTER);
translate(s/2, s/2);
strokeWeight(u*0.12); stroke(palette[0]);
// body
fill(metal);
const bw = u*(5+Math.floor(random(3))), bh = u*(5+Math.floor(random(3)));
rect(0, u*1.5, bw, bh, u*0.4);
// chest panel
fill(accent); rect(0, u*1.5, bw*0.5, bh*0.45, u*0.2);
// legs
fill(metal);
for (const sx of [-1, 1]) {
rect(sx*bw*0.28, u*1.5+bh*0.55+u*1.2, u*0.9, u*2.4, u*0.3);
fill(accent2); rect(sx*bw*0.28, u*1.5+bh*0.55+u*2.4, u*1.4, u*0.7, u*0.2); fill(metal);
}
// arms
const armStyle = Math.floor(random(2));
for (const sx of [-1, 1]) {
fill(metal);
if (armStyle === 0) rect(sx*(bw*0.5+u*0.6), u*1.5, u*0.8, bh*0.8, u*0.3);
else { for (let k=0;k<3;k++) circle(sx*(bw*0.5+u*0.6), u*0.2+k*u*0.9, u*0.8); }
fill(accent); circle(sx*(bw*0.5+u*0.6), u*1.5+bh*0.4, u*1.0);
}
// head
fill(metal);
const hw = u*(3.5+random(1.5)), hh = u*(3+random(1.5));
const headRound = random() < 0.5 ? u*1.4 : u*0.3;
rect(0, -u*2.5, hw, hh, headRound);
// eyes
fill(accent2);
const eyes = 1 + Math.floor(random(3));
for (let i = 0; i < eyes; i++) {
const ex = map(i, -0.5, eyes-0.5, -hw*0.28, hw*0.28);
circle(ex, -u*2.6, u*(0.7+random(0.4)));
fill(palette[0]); circle(ex, -u*2.6, u*0.3); fill(accent2);
}
// mouth
stroke(palette[0]); strokeWeight(u*0.18); noFill();
line(-hw*0.2, -u*1.5, hw*0.2, -u*1.5);
// antenna
stroke(metal); strokeWeight(u*0.16);
const ax = random([-1,0,1]) * hw*0.3;
line(ax, -u*2.5-hh*0.5, ax, -u*2.5-hh*0.5-u*1.4);
noStroke(); fill(accent); circle(ax, -u*2.5-hh*0.5-u*1.5, u*0.8);
}How it works
Author a library of interchangeable parts grouped by slot, each with anchor points and a rarity weight. To generate one: 1. For each slot (head, torso, arms, legs, accessory…), pick a part by weighted random choice — rarer parts have smaller weights. 2. Place each part at its slot's anchor so connection points line up; share a palette / parameter so the parts look coherent. 3. Resolve dependencies and exclusions (some combinations forbidden or implied) and optionally tint, scale or mirror parts parametrically. The combinatorics of slots × variants yield a huge edition; recording which parts were chosen gives each output its trait list (as in PFP NFT collections).
Parameters
slots: array — The part categories assembled (head, body, weapon, etc.).partsPerSlot: number — Number of options available in each slot.weights: array — Rarity weights biasing part selection.layerOrder: array — The z-order the chosen parts are stacked in.
Lineage
Frequently combined with
- 3D Mesh / Geometry · 5 works
- Generative Typography · 4 works
- Perlin / Simplex Noise · 3 works
- Plotter-style Hatching · 2 works
- HSL / Hue Cycle · 2 works
- Bezier / Catmull-Rom Splines · 2 works
- Particle System · 2 works
- Tangent Arcs / String Art · 1 work
- Symmetric Blob / Rorschach · 1 work
- Wave Function Collapse · 1 work
- Truchet Tiles · 1 work
- Dithering · 1 work
Works using this algorithm (25)
Last updated 2026-07-16