{
const svg = d3
.create("svg")
.attr("width", width)
.attr("height", height)
.attr("viewBox", `${-width / 2} ${-height / 2} ${width} ${height}`);
svg
.selectAll("path")
.data(triangles)
.enter()
.append("path")
.attr("fill", "#fff")
.attr("stroke", "#000")
.attr("stroke-width", 1)
.attr(
"d",
triangle =>
`
M${triangle[1]}
A${r} ${r} 0 0 1 ${triangle[2]}
A${r} ${r} 0 0 1 ${triangle[0]}
A${r} ${r} 0 0 1 ${triangle[1]}
Z
`
)
.attr("fill-opacity", 1);
return svg.node();
}