{
const s1 = s(v(-6, -3), v(-1, -1));
const subsegs1 = densify(s1, 0.5);
const s2 = s(v(0, 3), v(6, 2));
const subsegs2 = densify(s2, 1);
const width = 300;
const height = 200;
const scale = 20;
const origin = v(width / 2, height / 2);
const ctx = DOM.context2d(width, height);
const fig = new Figure({ ctx, scale, origin, width, height });
for (const subseg of subsegs1) {
fig.drawSegment(subseg, 'green');
}
for (const subseg of subsegs2) {
fig.drawSegment(subseg, 'blue');
}
return fig.canvas();
}