{
const height = 400;
const curve = bumpRadial;
const svg = d3
.create("svg")
.attr("viewBox", [-width / 2, -height / 2, width, height]);
const points = [
[0, 100],
[Math.PI / 3, 150],
[Math.PI * (2 / 3), 150],
[Math.PI * (3 / 3), 150],
[Math.PI * (4 / 3), 20],
[Math.PI * (5 / 3), 170],
[Math.PI * (6 / 3), 100]
];
const p = d3.lineRadial();
svg
.append("path")
.attr("fill", "none")
.attr("stroke", "brown")
.attr("d", p(points));
svg
.append("path")
.attr("fill", "none")
.attr("stroke", "#333")
.attr(
"d",
p.curve(curve)(
points.map(([x, y]) => [Math.atan2(x, -y), Math.hypot(x, y)])
)
);
return svg.node();
}