Modular Assembly / Parametric Character

固定されたモジュールの組み合わせから画像を構成する手法は、1960年代の具体/コンピュータアートの中核(例: マヌエル・バルバディージョのモジュール、カール・ゲルストナーの「プログラム」)であり、組合せ的・連続的デザインに根を持つ。拡散的な系譜。

コミュニティ・通称 名称 — 命名・エポニムではなく記述的なカテゴリ名。用語の単一の命名者は確認されていない。

ひとことで カテゴリ別に用意したパーツ(頭・胴・腕など)を確率的に組み合わせてキャラクターやオブジェクトを構成する手法。Algobots のロボット生成が典型。

Modular Assembly / Parametric Character · Open in new tab ↗ · Motion begins only when you press Run.

コード

上のデモの実際のスケッチ(サンドボックスで再現可能)。これで全部です。

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);
}

デモのソースを開く ↗

仕組み

スロット別の交換可能パーツ群(各々に接続点と希少度の重み)を用意し、1 体を生成する:(1) 各スロット(頭・胴・腕・脚・装飾…)で重み付きランダム選択 — 希少パーツほど重みが小さい、(2) 各パーツをスロットのアンカーに配置して接続点を合わせ、パレット/パラメータを共有して整合させる、(3) 依存・排他(禁止/含意される組合せ)を解決し、必要ならパラメトリックに着色・拡縮・反転。スロット×バリアントの組合せで巨大なエディションになり、選ばれたパーツを記録すれば各出力の trait リスト(PFP 系 NFT のような)になる。

パラメータ

系譜

関連
Wave Function Collapse、Geometric / Hexagonal Tiling

よく組み合わされるアルゴリズム

このアルゴリズムを使う作品 (25)

Algobots
stina-jones
Antichambre
anaglyphic
Buttons
jan-robert-leegte
Color Magic Planets
bard-ionson
CryptoNewYorker
qian-qian
CryptoVenetian
bright-moments
curio
corneel-cannaerts-luis-e-fraguada
Generativemasks
shunsuke-takawo
geVIENNAratives
cryptowiener
I'm Feeling Lucky
maya-man
Legends of Metaterra
hideo
Mountains and Drop Shadows
jan-robert-leegte
Muttenz
wuwa
nullMachines
kerim-safa-loackme
over-time
john-provencher
Placement
cooper-jamieson
PrimiDance
wuwa
PrimiLife
wuwa
Scatter Process[or]
kelly-milligan
Scoundrels
kristy-glas
Sheets
rudxane
Still Moving
nathaniel-stern-and-sasha-stiles
Structura
office-ca-protocelllabs
Woah La Coaster
blockwares
Yume no Sekai
kira0

最終更新 2026-07-16