答案1
这是实现此目的的方法。由于弹簧布局似乎有点难以控制,因此我使用了绝对顶点,稍后再将其连接起来。
下面的解决方案给出了左边部分,而右边部分是问题中发布的解决方案。
\documentclass[10pt, border=10pt]{standalone}
\usepackage{tikz-feynman}
\begin{document}
% placing absolut vertices first
\tikz{
\begin{feynman}
% specifying the vertices
\vertex (a) [empty dot] {};
\vertex (b) [dot, above right=2cm of a] {};
\vertex (c) [empty dot, below right=2cm of a] {};
\vertex (d) [empty dot, right=2.8cm of a] {};
\vertex (i1) [above left=2.5cm of a] {};
\vertex (i2) [below left=2.5cm of a] {};
\vertex (f1) [above right=2.5cm of d] {};
\vertex (f2) [below right=2.5cm of d] {};
% drawing the connections
\diagram*{% NO spring layout, though it dowsn't seem to matter
% loops
(a) -- [quarter left] (b),
(b) -- [quarter left] (d),
(a) -- [quarter right](c),
(c) -- [quarter right](d),
(b) -- [quarter right] (c),
(b) -- [quarter left] (c),
% initial
(i1) -- (a),
(i2) -- (a),
% final
(f1) -- (d),
(f2) -- (d)
};
\end{feynman}
}
\hspace{1em}
% initial solution
\feynmandiagram [layered layout, horizontal=a to b] {
{i1, i2} -- a[empty dot] -- [half left] b[empty dot] -- [half left] a,
b -- {f1, f2},
};
\end{document}