function draw(wire1, wire2, ints, h, scale) {
const ctx = DOM.context2d(h, h);
ctx.lineWidth = 1;
ctx.fillStyle = 'black';
drawWire(ctx, wire1, h, scale, 'red');
drawWire(ctx, wire2, h, scale, 'blue');
ctx.beginPath();
ctx.arc(h / 2, h / 2, 2, 0, 2 * Math.PI);
ctx.fill();
ctx.fillStyle = 'green';
for (const intMap of ints) {
for (const [key, val] of intMap) {
if (key === '[0,0]') continue;
const p = JSON.parse(key);
ctx.beginPath();
ctx.arc(p[0] * scale + h / 2, p[1] * scale + h / 2, 2, 0, 2 * Math.PI);
ctx.fill();
}
}
return ctx.canvas;
}