Pythagoras tree: Difference between revisions

m
Line 1,007:
const [c, e, d] = [2, 3, 2].map((j, i) => ({ x: a.x + w(i, j), y: a.y + w(-j, i) }));
base.push([c, e], [e, d]);
return ga + `\n<polygon points="${[a, c, e, d, c, d, b].map(p => [p.x, p.y])}"/>\n`;
}, `<g fill="#${rg(20)}${rg(30)}18">\n`) + '\n</g>\n';
}, '<svg xmlns="http://www.w3.org/2000/svg" width="1200" stroke="white">\n') + '</svg>';
 
106

edits