Terdragon
The Terdragon is the three-fold cousin of the Dragon Curve. Where the Heighway dragon replaces each segment with two segments at a right angle, the Terdragon replaces each segment with three segments joined by 120° turns. The result is a curve that folds into a field of interlocking triangles and hexagons.
This fractal uses a single-symbol L-system:
const terdragon = {
axiom: "F",
replace: {
F: "F+F-F",
},
angle: 120,
};
F means "draw forward one step", while + and - turn the drawing direction by 120° counter-clockwise and clockwise. After each iteration the curve has three times as many segments, and the distance from start to end grows by a factor of .
So the Terdragon is made of copies of itself, each scaled by . Its similarity dimension is
which makes it a space-filling curve: in the limit it covers a region of the plane. It touches itself at many points, but it never draws the same segment twice. The boundary of that region is a fractal of its own, with dimension , the same as the Koch curve.
You can compare it with the Twindragon, which joins two Heighway dragons into a tile, and with the Lévy Curve, another curve built from a simple folding rule.