# Tikz-Feynman for a 4-point vertex automatic creation

I'd like to create a Feynman diagram for the λφ⁴ theory that is simply the interaction 4-point vertex. For some reason, in TikZ-Feynman it seems to be automatic that the incoming and outgoing lines go up-down and left-right even though no one would ever draw it like that. Short of manually inputting the vertex locations, how can I get this rotated 45 degrees?

(I've seen a similar post here, but it seems like that person wanted the lines positioned in a strange way. I'd like them positioned at 90 degrees to each other.)

The algorithms that TikZ-Feynman (CTAN) uses only figure out how to place the vertices relative to other vertices. Unfortunately, the algorithms have no notion of the overall orientation.

Fortunately, you can easily adjust the orientation with either

vertical=<vertex> to <vertex>


or

horizontal=<vertex> to <vertex>


In addition to these two keys, there are corresponding primed options (vertical' and horizontal') which adjust the overall orientation and then perform an additional flip.

Here's an example of a 4-point interaction in a λφ⁴ theory:

\documentclass[tikz,border=10pt]{standalone}

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

\begin{document}
\feynmandiagram [horizontal=i1 to f2, edges={scalar}] {
{i1, i2} -- c [dot] -- {f1, f2},
};
\end{document}


One thing you'll notice is that vertical and horizontal can take any (distinct) nodes; the nodes need not be connected.