Substitution
This is a geometric construction of the tiling.
These are the recursive substitution rules for a triangle define by ABC:
- Let φ be the golden ratio:
(1 + √5) / 2 - Rule 0
- Let
Pbe a point onAB:P = A + (B - A) / φ - Add the triangles:
CPBandPCA
- Let
- Rule 1
- Let
Rbe a point point onBC:R = B + (C - B) / φ - Add the triangle:
RCAandBAR - Further apply Rule 0 to
BAR
- Let
function subdivideStep (triangles) {return triangles.flatMap(function (triangle) {const { color, A, B, C } = triangleif (color === 0) {// P = A + (B - A) / goldenRatio;const P = goldenpoint(A, B)return [{ color: 0, A: C, B: P, C: B },{ color: 1, A: P, B: C, C: A }]} else {// R = B + (C - B) / goldenRatio;const R = goldenpoint(B, C)return [{ color: 1, A: R, B: C, C: A },// this triangle is further subdivided{ color: 0, A: B, B: A, C: R }]}})}