{
const lines = [];
cantor(0, 10, 600);
function cantor(x, y, length) {
if (length < 1) return;
lines.push({ x, y, length });
const l = length / 3;
cantor(x, y + 20, l);
cantor(x + l * 2, y + 20, l);
}
const app = cm.app({
width: 640,
height: 120,
draw: [
cm.svg("line", lines, {
x1: (d) => d.x,
y1: (d) => d.y,
x2: (d) => d.x + d.length,
y2: (d) => d.y,
stroke: "black",
strokeWidth: 2
})
]
});
return app.render();
}