5

I would like to draw the Hartree diagram like that:

enter image description here

(actually only the right hand side, but that doesn't matter)

My attempts end up like this:

\documentclass[tikz]{standalone}
\usepackage[compat=1.1.0]{tikz-feynman}

\begin{document}

\feynmandiagram [horizontal=a to b] {
  a -- [photon] b -- [out=45, in=-45, loop, min distance=2cm, fermion] b,
};

\feynmandiagram [horizontal=a to b] {
a --[photon] b -- [fermion, half left] c
-- [half left] b,
};

\end{document}

Both results are ugly, because it's not a nice circle and the proportions are also bad (wigly line is too long). Can someone help me out?

enter image description here enter image description here

1 Answer 1

5

It is often easier not to use the automatic placement algorithms.

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage[compat=1.1.0]{tikz-feynman}
\begin{document}
\begin{tikzpicture}
\begin{feynman}
\coordinate (a);
\coordinate[left=1.5cm of a] (c);
\coordinate[right=3cm of a] (b);
\coordinate[right=1.5cm of b] (d);
\diagram* {
(a) -- [half left] (c) -- [fermion, half left] (a)
--[photon] (b) -- [half right] (d) -- [fermion, half right] (b)};
\end{feynman}
\end{tikzpicture}
\end{document}

enter image description here

And just for fun with bent arrows.

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage[compat=1.1.0]{tikz-feynman}
\usetikzlibrary{arrows.meta,decorations.markings}
\usetikzlibrary{bending} 
\tikzset{
    arc arrow/.style args={%
    to pos #1 with length #2}{
    decoration={
        markings,
         mark=at position 0 with {\pgfextra{%
         \pgfmathsetmacro{\tmpArrowTime}{#2/(\pgfdecoratedpathlength)}
         \xdef\tmpArrowTime{\tmpArrowTime}}},
        mark=at position {#1-\tmpArrowTime} with {\coordinate(@1);},
        mark=at position {#1-2*\tmpArrowTime/3} with {\coordinate(@2);},
        mark=at position {#1-\tmpArrowTime/3} with {\coordinate(@3);},
        mark=at position {#1} with {\coordinate(@4);
        \draw[-{Latex[length=#2,bend]}]       
        (@1) .. controls (@2) and (@3) .. (@4);},
        },
     postaction=decorate,
     }
}


\begin{document}
\begin{tikzpicture}
\begin{feynman}
\coordinate (a);
\coordinate[right=3cm of a] (b);
\diagram* {
(a) --[photon] (b)};
\end{feynman}
\draw[arc arrow={to pos 0.3 with length 4mm}] (a) arc(0:360:1);
\draw[arc arrow={to pos 0.3 with length 4mm}] (b) arc(180:-180:1);
\end{tikzpicture}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .