{
const context = DOM.context2d(width, height);
const path = d3.geoPath().context(context);
const dist = d3.map(edges, euclidian);
const w = d3.scaleLinear([0, edges.length - 1], [2.5, 0.12]);
const c = d3.scaleSequential([0, edges.length - 1], d3.interpolateWarm);
for (const [q, i] of d3
.sort(d3.range(dist.length), (i) => dist[i])
.entries()) {
const [a, b] = edges[i];
context.beginPath();
path({ type: "LineString", coordinates: [points[a], points[b]] });
context.lineWidth = w(q);
context.strokeStyle = c(q);
context.stroke();
}
return context.canvas;
}