function markings({
stroke = "currentColor",
strokeWidth = 1,
strokeOpacity = 1
} = {}) {
const angle = Math.atan(90 / 220);
const arc = d3.arc();
const lines = [
[-250, 420, 250, 420],
[-250, 450, -250, -50],
[250, 450, 250, -50],
[250, -50, -250, -50],
[-220, -50, -220, 90],
[220, -50, 220, 90],
[-80, -50, -80, 140],
[80, -50, 80, 140],
[-60, -50, -60, 140],
[60, -50, 60, 140],
[-80, 140, 80, 140],
[-30, -10, 30, -10],
[0, -10, 0, -7.5],
[-40, -10, -40, 0],
[40, -10, 40, 0]
];
const circles = [
[0, 0, 7.5],
[0, 140, 60],
[0, 420, 20],
[0, 420, 60]
];
const arcs = [
[0, 0, 40, -Math.PI * 0.5, Math.PI * 0.5],
[0, 0, 237.5, -Math.PI * 0.5 - angle, Math.PI * 0.5 + angle]
];
return (index, {x, y}) => {
return htl.svg`<g fill=none stroke=${stroke} stroke-width=${strokeWidth} stroke-opacity=${strokeOpacity}>
${lines.map(([x1, y1, x2, y2]) => htl.svg`<line x1=${x(x1)} x2=${x(x2)} y1=${y(y1)} y2=${y(y2)}>`)}
${circles.map(([cx, cy, r]) => htl.svg`<ellipse cx=${x(cx)} cy=${y(cy)} rx=${Math.abs(x(r) - x(0))} ry=${Math.abs(y(r) - y(0))}>`)}
${arcs.map(([cx, cy, r, a1, a2]) => htl.svg`<path d="M${x(cx + r * Math.cos(a1 - Math.PI / 2))},${y(cy + r * Math.sin(a1 - Math.PI / 2))}A${Math.abs(x(r) - x(0))} ${Math.abs(y(r) - y(0))} 0 0 ${Math.sign(x(r) - x(0)) * Math.sign(y(r) - y(0)) > 0 ? 0 : 1} ${x(cx + r * Math.cos(a2 - Math.PI / 2))},${y(cy + r * Math.sin(a2 - Math.PI / 2))}">`)}
</g>`;
};
}