drawPoints = (state, type, color = palette.fg) =>
state.points.map(({ u, v, filled }) => {
const cx = marginX + scaleXY(u);
const cy = marginY + scaleXY(v);
const l = 10;
if ((type === undefined || type === "emtpy") && !filled) {
return svg`<line
x1=${cx - l} y1=${cy - l}
x2=${cx + l} y2=${cy + l}
stroke-width=${strokeWidth}
stroke=${color}
></line>
<line
x1=${cx - l} y1=${cy + l}
x2=${cx + l} y2=${cy - l}
stroke-width=${strokeWidth}
stroke=${color}
></line>`;
}
if ((type === undefined || type === "filled") && filled)
return svg`<circle cx=${cx} cy=${cy} r=${strokeWidth} fill=${color}></rect>`;
})