Fractal / Recursive Subdivision
初出 1975 · Benoit Mandelbrot — Benoit Mandelbrot coined "fractal" (1975); "The Fractal Geometry of Nature", 1982. · 年表 ↗
コミュニティ・通称 名称 — 記述的命名。「フラクタル」は Benoit Mandelbrot(1975) の造語。「fractal recursion」は再帰的自己相似生成の記述的ラベルで、命名されたアルゴリズム名ではない。
ひとことで 自己相似な構造を再帰的に生成する一般的なテクニック。Koch / Sierpinski / 再帰的な矩形分割 (Mondrian 風) など。
コード
上のデモの実際のスケッチ(サンドボックスで再現可能)。これで全部です。
fractal-recursion/index.html
const SEED = Math.floor(Math.random()*1e9);
// Recursive subdivision: each square is probabilistically split into 4
// quadrants; leaves are filled with a depth-tinted colour. A self-similar
// Mondrian-meets-quadtree fractal.
function setup() {
randomSeed(SEED);
const s = Math.min(windowWidth, windowHeight);
createCanvas(s, s);
colorMode(HSB, 360, 100, 100);
background(0, 0, 8);
const baseHue = random(360);
subdivide(0, 0, s, 0);
function subdivide(x, y, size, depth) {
const pSplit = Math.max(0, 0.92 - depth * 0.14);
if (size > s * 0.02 && depth < 8 && random() < pSplit) {
const h = size / 2;
subdivide(x, y, h, depth + 1);
subdivide(x + h, y, h, depth + 1);
subdivide(x, y + h, h, depth + 1);
subdivide(x + h, y + h, h, depth + 1);
} else {
const h = (baseHue + depth * 34) % 360;
fill(h, 60, 30 + depth * 9);
stroke(0, 0, 8);
strokeWeight(s * 0.0015);
const g = size * 0.04;
rect(x + g, y + g, size - 2*g, size - 2*g, size * 0.06);
}
}
}仕組み
基底ケースと、形を自分自身の小さな複製/部分に置き換える再帰ステップを定義し、各部分に呼び出す:(1) 再帰深さ(または最小サイズ)上限に達したら形を描いて戻る、(2) そうでなければ形を N 個の部分に変換し(線分を Koch 曲線の 4 片に分割、矩形を 2〜4 の小矩形に分割、角度を付けて子枝を生成 など)、各部分へ再帰。同じ規則が全スケールで走るためあらゆる倍率で詳細が現れる(自己相似)。分岐数・縮小比・分割の乱数性が見た目を決め、厳格なシェルピンスキー三角形から有機的な樹木まで作れる。
パラメータ
depth: number — Maximum recursion depth.splitCount: number — Children produced at each subdivision.ratio: number — Scale factor applied to each child relative to its parent.angle: number — Branching/rotation angle applied per level.
系譜
よく組み合わされるアルゴリズム
- Particle System · 4 作品
- Geometric / Hexagonal Tiling · 4 作品
- Bezier / Catmull-Rom Splines · 3 作品
- Symmetric Blob / Rorschach · 2 作品
- Polygon Mosaic · 2 作品
- Multi-color Modular Truchet · 2 作品
- Quadtree / Recursive Quad Split · 2 作品
- Boids / Flocking · 2 作品
- Raymarching with SDFs · 1 作品
- Perlin / Simplex Noise · 1 作品
- Plotter-style Hatching · 1 作品
- Poisson Disk Sampling · 1 作品
このアルゴリズムを使う作品 (25)
a heart and a soul
roman-janajev
Corners
rafael-rozendaal
Cryptoblots
daim-aggott-honsch
Cyber Cities
pxlq
Divisions
michael-connolly
Dynamic Slices
pxlq
Exhibition: 3291
cryptobauhaus
Fabergé Fractals
tom-beddard
Flora NT
petar-milojevic
FOCUS
matto
Fractal
herbert-w-franke
Imposter Syndrome
ippsketch
Machine Comics
roni-block
Patchwork Saguaros
jake-rockland
Pieces of Me
r4v3n
Sheets
rudxane
SL/CE
stranger-in-the-q
Space Debris [m'aider]
whalestreet-x-pxlq
Space Debris [ravaged]
whalestreet-x-pxlq
Space Debris [warning]
whalestreet-x-pxlq
Thereidoscope
daim-aggott-honsch
Variant Plan
jeff-davis
Vol Libre
loren-carpenter
Window
jan-robert-leegte
Zabriskie Point
ken-musgrave
参考文献
最終更新 2026-07-16