1

In tikz-feynman, I want to draw a curved arc between two points, and then attach a loop to this. Here is an extremely hack version I did as a stopgap:

\documentclass{article}
\usepackage{tikz} 
\usepackage[compat=1.1.0]{tikz-feynman}
\begin{document}

\begin{tikzpicture}
\begin{feynman}

    \vertex (t) at (0,2);
    \vertex (b) at (0,-2);
    \vertex (lt) at (-0.5,1);
    \vertex (lm) at (-1,0);
    \vertex (lb) at (-0.5,-1);
    \vertex (rt) at (0.5,1);
    \vertex (rm) at (1,0);
    \vertex (rb) at (0.5,-1);
    \diagram*{
    (t) -- (lt) -- (lm) -- (lb) -- (b),
    (t) -- (rt) -- (rm) -- (rb) -- (b),
    (lt) -- [gluon] (lb),
    };  
\end{feynman}
\end{tikzpicture}
\end{document}

which produces

diagram

I hope the idea is clear enough. This would be adequate for my purposes except that I want the lines to be curved, i.e. this should be two arcs between (t) and (b), not this ugly diamond-shaped thing. I think what I want to do is just draw the two arcs from (t) to (b) and then define some vertices "along the arcs" with which I can make the gluon line, but have struggled to figure out how to do this.

Because this diagram is part of a larger equation of diagrams, I would prefer to use absolute vertex positions for at least (t) and (b).

2

UPDATE: Flexible answer. You can change the position at will by adjusting .3 and .7 to your needs.

\documentclass{article}
\usepackage{tikz} 
\usetikzlibrary{decorations.markings}
\usepackage[compat=1.1.0]{tikz-feynman}
\begin{document}

\begin{tikzpicture}
\draw[postaction={decorate,
decoration={markings,mark=at position .3 with {\coordinate (lt);},
mark=at position .7 with {\coordinate (lb);}}}] (0,0) circle (2); 
\begin{feynman}
    \diagram*{
    (lt) -- [gluon] (lb),
    };  
\end{feynman}
\end{tikzpicture}
\end{document}

enter image description here

ORIGINAL ANSWER: (Just in case someone wants to do this within a diagram of tikz-feynman. You can work with quarter right. Then some of your vertices become unnecessary.

\documentclass{article}
\usepackage{tikz} 
\usepackage[compat=1.1.0]{tikz-feynman}
\begin{document}

\begin{tikzpicture}
\begin{feynman}

    \vertex (lt) at (-0.5,1);
    \vertex (lb) at (-0.5,-1);
    \vertex (rt) at (0.5,1);
    \vertex (rb) at (0.5,-1);
    \diagram*{
    (lt) --[quarter right]  (lb) --[quarter right] (rb)
    -- [quarter right] (rt) -- [quarter right] (lt),
    (lt) -- [gluon] (lb),
    };  
\end{feynman}
\end{tikzpicture}
\end{document}

enter image description here

  • That's an interesting workaround--thanks! I would still kind of like to know if there's a solution where I can place nodes along my lines, so I could have more control over the shape of the lines... this solution also has the difficulty that I can't control where exactly the top and bottom of the diagram are, which will make it hard to align this diagram wrt other diagrams in an equation. – twoform Apr 22 '18 at 21:31
  • @twoform Of course there are plenty of such possibilities in TikZ. The question is whether you insist on a pure tikz-feynman solution. – marmot Apr 22 '18 at 21:37
  • I am fully willing to use a non tikz-feynman solution! I suppose that might be the way to go at this point. I imagine putting this all together in just standard tikz might be easier. Too bad though, I am lazy and like tikz-feynman ;) – twoform Apr 22 '18 at 21:43
  • @twoform I added an alternative. – marmot Apr 22 '18 at 21:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.