% Read in by FEYNMANDOC:  FEYNMANDOC3A.  Called by FD3A.COM
%\callvertex  statements removed:  see FEYNMANDOC3AOLD.
\chapter{Drawing Vertices}

Most types of vertices will be drawn using the \ddrawline\ command.
A few specialized vertices, those of three and four gauge bosons,
have been pre-defined.

\section{The \ddrawvertex\ Command}

The command {\it \ddrawvertex} is used to produce a limited number of
vertices in conjunction with a number of special options.
The syntax is:\\
\begin{verbatim}

\drawvertex<particle type>[<direction><number of lines in vertex>]
   (<(x,y) co-ordinates of `beginning' of vertex>)[length of lines in vertex]

\end{verbatim}
where the parameters are similar to those of the \ddrawline\ statement.
An example is:
\begin{verbatim}

\drawvertex\gluon[\S 3](0,10000)[4]

\end{verbatim}
which would draw a three-gluon vertex commencing from the co-ordinate
point (0,10000) (see section 1.5 for a discussion of the co-ordinate
grid), with the initial line drawn in a {\it southerly} direction
(towards the bottom of the page) then branching into two other gluons
(in the \verb@\SE@ and \verb@\SW@ direction in this case).   Each would
be of length four, \ie\ have four loops.  Thus the end result would be
a three-gluon vertex centred at some point (which will receive a
co-ordinate label \verb@(\vertexmidx,\vertexmidy)@) beneath the
point (0,10000).  It will have one gluon line running {\it northward}
from that line and terminating at (0,10000) and two others running
southeasterly and southwesterly.  In point of fact it would be:

\begin{picture}(24000,15000)
\drawvertex\gluon[\S 3](20000,14000)[4]
\put(20100,13900){$\leftarrow(0,10000)$}
\end{picture}
\vskip 0.75in

%Sometime prior to the initial use of \ddrawvertex the command
%\verb@\callvertex@ must be issued.  This may be done any time after
%\FEYNMAN\ has been input and must only be done once per document.
%
We will refer to the initial line drawn (that one specified by the
direction parameter) as {\em line one} and number the lines sequentially
in a clockwise sense about the vertex.  Therefore we will have
line two, three and, possibly, four.  In the above example line one 
is the northerly line, line two is the southeasterly line and
line three is the southwesterly line (with respect to the centre).
When \ddrawvertex\ is executed it returns the following parameters:


\begin{verbatim}

\vertexonex,\vertexoney:       The (x,y) co-ordinates of the back of line one.
\vertextwox,\vertextwoy:       The (x,y) co-ordinates of the back of line two.
\vertexthreex,\vertexthreey:   The (x,y) co-ordinates of the back of line three.
\vertexfourx,\vertexfoury:     The (x,y) co-ordinates of the back of line four.
\vertexmidx,\vertexmidy:       The (x,y) co-ordinates of the middle of the vertex.
\vertexcount:                  The number of vertices printed thus far.

\end{verbatim}

When drawing a gluon vertex all of the parameters returned by
\verb@\drawline\gluon@ are defined but take the values of the last
gluon drawn (number three for a three-gluon vertex and number four
for a four-gluon vertex).  Thus when \verb@\drawvertex\gluon[\N 4]...@
is encountered \bs gluonlengthx, \bs pmidy, \bs gluonfrontx, \etc\
will be defined with the values appropriate for gluon four (the \bs E
gluon in this instance).  The same applies for photonic vertices.

\section{The Types of Vertex Lines}

The kinds of particle lines which \FEYNMAN\ can draw with \ddrawvertex\ are:
\begin{verbatim}

                     \photon
                     \gluon

\end{verbatim}
which are implemented as
\begin{verbatim}
                     \drawvertex\photon...                     
                     \drawvertex\gluon...
\end{verbatim}

Note that this is the only argument of \ddrawvertex\ which is in lowercase
letters.  The \bs photon option is useful to represent ZWW, ZZWW, graviton
vertices and so forth.  Drawing $\psi\bar\psi\gamma$\ and similar
vertices has been demonstrated repeatedly.  Section 2.1 illustrated the
basic command sequence.

\section{Particle Direction}

Each vertex may be drawn in any of eight possible directions,
specified by the points of the compass with North always understood
as being at the top of the page:

\begin{verbatim}

             \N   \NE   \E   \SE   \S   \SW   \W   \NW

\end{verbatim}
This is the second argument of \ddrawvertex, just as it was for \ddrawline.
\begin{verbatim}
\drawvertex\photon[\NW...
\end{verbatim}
and so forth.  Line one is drawn from the specified point
in the indicated direction.  The vertex is at the terminus of this line.
Note that all directions are in uppercase and, as always,
don't omit the backslash.
All of the particle lines in the vertex are drawn in these compass directions.
Vertices with four particles are drawn in a cross, that is each line is
separated by $90^\circ$.  Vertices with three particle lines are drawn
in a `{\sf Y}' configuration with the specified direction being the `base'
of the {\sf Y}.  Thus a four-photon vertex drawn in the \bs NW
direction will have line one in the \bs NW direction, with the vertex
at the NW end.  Line two will move around clockwise from this by $90^\circ$\
and so will be drawn in the \bs SW direction out of the hub.  Line three
will be in the \bs NW direction and line four in the \bs NE from the
vertex.  A three-photon vertex drawn in the \bs NW direction will again
have line one in the same direction.  Line two will now be $135^\circ$\ further 
in a clockwise sense and therefore will be in the \bs W direction.  Line three
will be in the \bs N direction.  Lines two and three will always be
separated by $90^\circ$.  

\section{The Number of Lines}

The third parameter will either be a 3 or a 4.  It declares whether
a three or four particle vertex is to be drawn.  Any other entry will
result in an error.

\section{Line Co-ordinate Parameters}

\subsection{Input Parameters}

The fourth and fifth arguments of the \ddrawvertex\ command
are the (x,y) co-ordinates of the {\em beginning} of particle
line number one.  These are as measured in {\em centipoints} on the grid
which \FEYNMAN\ has established.  They are entered in the format
$(x\ co$-$ordinate,y\ co$-$ordinate)$\ where $x$ and $y$ may be integer
numbers (between, roughly, -30,000 and +30,000) or variables
(counters) with numerical values.  A number of variables have been
pre-defined and available for use.  The user may also define his own
(see the section on storing information).  Once again some samples may be
illustrative:
\begin{verbatim}

\drawvertex\photon[\SE 3](-1500,12000)[2]
\drawvertex\photon[\E 4](\photonbackx,\photonbacky)[2]
\drawvertex\gluon[\N 4](\Xone,\Yone)[1]
\drawvertex\gluon[\SW 3](3000,\vertexthreey)[7]

\end{verbatim}

In the above \bs photonbackx and \bs photonbacky are co-ordinates,
presumably returned from a previously drawing a photon.
\bs Xone and \bs Yone are some values stored by the user and
\bs vertexthreey is the ordinate of the endpoint of the third line in 
the previously drawn vertex.

\subsection{Output Parameters}

In section 3.1 we listed a number of useful positional parameters 
which are returned when \ddrawvertex\ is called.
For the appropriate vertices the following are defined, each definition 
superseding the previous value of the variable.
\begin{verbatim}

\vertexonex,\vertexoney:       The (x,y) co-ordinates of the back of line one.
\vertextwox,\vertextwoy:       The (x,y) co-ordinates of the back of line two.
\vertexthreex,\vertexthreey:   The (x,y) co-ordinates of the back of line three.
\vertexfourx,\vertexfoury:     The (x,y) co-ordinates of the back of line four.
\vertexmidx,\vertexmidy:       The (x,y) co-ordinates of the middle of the vertex.
\vertexcount:                  The number of vertices printed thus far.

\end{verbatim}
These are graphically illustrated by

\begin{verbatim}

\begin{picture}(20000,11000)
\drawvertex\photon[\N 3](18500,0)[4]
\drawline\fermion[\SW\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\SE\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\N\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\W\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\N\REG](\vertexthreex,\vertexthreey)[2000]
\drawline\fermion[\E\REG](\vertexthreex,\vertexthreey)[2000]
\put(\vertexonex,\vertexoney){\quad (vertexonex,vertexoney)}
\put(1000,\vertextwoy){(vertextwox,vertextwoy)}
\put(\fermionbackx,\vertexthreey){\quad (vertexthreex,vertexthreey)}
\put(\vertexmidx,\vertexmidy){\quad (vertexmidx,vertexmidy)}
\end{picture}

\end{verbatim}
%which assumes that \bs callvertex has not been issued previously.  
This yields
\vskip 0.5in

\begin{picture}(20000,11000)
\drawvertex\photon[\N 3](18500,0)[4]
\drawline\fermion[\SW\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\SE\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\N\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\W\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\N\REG](\vertexthreex,\vertexthreey)[2000]
\drawline\fermion[\E\REG](\vertexthreex,\vertexthreey)[2000]
\put(\vertexonex,\vertexoney){\quad (vertexonex,vertexoney)}
\put(1000,\vertextwoy){(vertextwox,vertextwoy)}
\put(\fermionbackx,\vertexthreey){\quad (vertexthreex,vertexthreey)}
\put(\vertexmidx,\vertexmidy){\quad (vertexmidx,vertexmidy)}
\end{picture}
\vskip 0.5in
and
\begin{verbatim}

\begin{picture}(8000,8000)
\drawvertex\gluon[\NE 4](0,0)[3]
\drawline\fermion[\W\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\S\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\N\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\W\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\E\REG](\vertexthreex,\vertexthreey)[2000]
\drawline\fermion[\N\REG](\vertexthreex,\vertexthreey)[2000]
\drawline\fermion[\E\REG](\vertexfourx,\vertexfoury)[2000]
\drawline\fermion[\S\REG](\vertexfourx,\vertexfoury)[2000]
\put(\vertexonex,\vertexoney){  (vertexonex,vertexoney)}
\put(\vertextwox,\vertextwoy){  (vertextwox,vertextwoy)}
\put(\vertexthreex,\vertexthreey){  (vertexthreex,vertexthreey)}
\put(\vertexfourx,\vertexfoury){  (vertexfourx,vertexfoury)}
\put(\vertexmidx,\vertexmidy){  (vertexmidx,vertexmidy)}
\end{picture}

\end{verbatim}
giving us
\vskip 0.481in
\begin{picture}(18000,8000)
\drawvertex\gluon[\NE 4](12000,0)[3]
\drawline\fermion[\W\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\S\REG](\vertexonex,\vertexoney)[2000]
%\put(\vertexonex,\fermionbacky){(vertexonex,vertexoney)}
\put(0,\fermionbacky){(vertexonex,vertexoney)}
\drawline\fermion[\N\REG](\vertextwox,\vertextwoy)[2000]
%\put(\vertextwox,\fermionbacky){(vertextwox,vertextwoy)}
\put(0,\fermionbacky){(vertextwox,vertextwoy)}
\drawline\fermion[\W\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\E\REG](\vertexthreex,\vertexthreey)[2000]
\put(\fermionbackx,\vertexthreey){\quad (vertexthreex,vertexthreey)}
\drawline\fermion[\N\REG](\vertexthreex,\vertexthreey)[2000]
\drawline\fermion[\E\REG](\vertexfourx,\vertexfoury)[2000]
\put(\fermionbackx,\vertexfoury){\quad (vertexfourx,vertexfoury)}
\drawline\fermion[\S\REG](\vertexfourx,\vertexfoury)[2000]
\put(\vertexmidx,\vertexmidy){\quad\quad (vertexmidx,vertexmidy)}
\end{picture}
\vskip 0.5in
%Note that we no longer need (or may use) a \bs callvertex statement.

\section{Vertex Line Lengths}

To make the analogy between \ddrawline\ complete,
the final parameter to be given to \ddrawvertex\ is the {\it length}
of the particles to be drawn.  The units in which the length is given
varies in way discussed in section 2.6
For gluons the length parameter is the {\em number of loops}.
The actual length of each loop depends upon which style is selected and
whether the gluon is drawn diagonally (at a slant) or not.
For photons the unit of measure is not a `wiggle', but a `half-wiggle'.
This enables one to produce a photon which both begins and ends on
the `upward' (or `downward') part of its oscillation.  
Each `leg' of the vertex will be drawn with the requested number of loops
or half-wiggles.  If a gluon vertex with a different number of loops
on each leg were required then the additional loops would be attached
subsequently to a basic vertex.  Special features are discussed in
the next chapter for doing this (\bs vertexlink and \bs vertexcap).
The particle styles selected will be discussed in sections 3.8 and 3.9.

The following illustrates the length parameter for photons:

\vskip 0.1in
\begin{picture}(18000,18000)
\drawvertex\photon[\NE 4](0,0)[1]
\drawvertex\photon[\NE 4](\vertextwox,\vertextwoy)[2]
\drawvertex\photon[\NE 4](\vertextwox,\vertextwoy)[3]
\drawvertex\photon[\NE 4](\vertextwox,\vertextwoy)[4]
\end{picture}
\vskip 0.2in
which was drawn with

\begin{verbatim}

\begin{picture}(18000,18000)
\drawvertex\photon[\NE 4](0,0)[1]
\drawvertex\photon[\NE 4](\vertextwox,\vertextwoy)[2]
\drawvertex\photon[\NE 4](\vertextwox,\vertextwoy)[3]
\drawvertex\photon[\NE 4](\vertextwox,\vertextwoy)[4]
\end{picture}

\end{verbatim}
In the above example both \bs photonlengthx,y and \bs particlelengthx,y
would assume the values of the last photon actually drawn
(the \bs SE photon with four half-wiggles).

\section{Flipped Vertices}

\ddrawline\ draws the vertices in a standard configuration.  For four-particle
vertices all of the lines commence from the hub in a clockwise orientation.
For three-particle vertices lines one and two begin in a clockwise curvature and
line three in a counter-clockwise sense.  It is often very convenient, 
particularly when linking vertices directly together, to be able to draw
one or more lines in a \bs {\it flipped} configuration, that is flipped
about its axis.  Obviously this will usually result in an \ae sthetically
unpleasing vertex.  \FEYNMAN\ admits a few more-or-less appealing flipped
vertices to be drawn using the \verb&\flipvertex& command.

When \verb&\flipvertex& appears directly prior to a \ddrawvertex\ statement
certain of the lines will be drawn flipped with respect to the default.
For four-particle vertices {\em all} of the lines are flipped.  For
three-particle vertices only {\em line one} will be flipped.  Other
combination may be drawn using \ddrawline.

The following file illustrates \bs flipvertex at work:

\begin{verbatim}

\begin{picture}(28000,28000)
\drawvertex\gluon[\NE 4](0,19000)[3]
\drawline\fermion[\W\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\S\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\N\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\W\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\E\REG](\vertexthreex,\vertexthreey)[2000]
\drawline\fermion[\N\REG](\vertexthreex,\vertexthreey)[2000]
\drawline\fermion[\E\REG](\vertexfourx,\vertexfoury)[2000]
\drawline\fermion[\S\REG](\vertexfourx,\vertexfoury)[2000]

\flipvertex\drawvertex\gluon[\NE 4](18000,19000)[3]
\drawline\fermion[\W\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\S\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\N\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\W\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\E\REG](\vertexthreex,\vertexthreey)[2000]
\drawline\fermion[\N\REG](\vertexthreex,\vertexthreey)[2000]
\drawline\fermion[\E\REG](\vertexfourx,\vertexfoury)[2000]
\drawline\fermion[\S\REG](\vertexfourx,\vertexfoury)[2000]

\THICKLINES

\drawvertex\photon[\SE 3](0,8000)[5]
\drawline\fermion[\W\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\N\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\NE\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\SE\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\SW\REG](\vertexthreex,\vertexthreey)[2000]
\drawline\fermion[\SE\REG](\vertexthreex,\vertexthreey)[2000]

\flipvertex\drawvertex\photon[\SE 3](18000,8000)[5]
\drawline\fermion[\W\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\N\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\NE\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\SE\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\SW\REG](\vertexthreex,\vertexthreey)[2000]
\drawline\fermion[\SE\REG](\vertexthreex,\vertexthreey)[2000]

\end{picture}

\end{verbatim}
which would draw:
\vskip 0.5in \hskip 1.05in
\begin{picture}(28000,28000)
\drawvertex\gluon[\NE 4](0,19000)[3]
\drawline\fermion[\W\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\S\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\N\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\W\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\E\REG](\vertexthreex,\vertexthreey)[2000]
\drawline\fermion[\N\REG](\vertexthreex,\vertexthreey)[2000]
\drawline\fermion[\E\REG](\vertexfourx,\vertexfoury)[2000]
\drawline\fermion[\S\REG](\vertexfourx,\vertexfoury)[2000]

\flipvertex\drawvertex\gluon[\NE 4](18000,19000)[3]
\drawline\fermion[\W\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\S\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\N\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\W\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\E\REG](\vertexthreex,\vertexthreey)[2000]
\drawline\fermion[\N\REG](\vertexthreex,\vertexthreey)[2000]
\drawline\fermion[\E\REG](\vertexfourx,\vertexfoury)[2000]
\drawline\fermion[\S\REG](\vertexfourx,\vertexfoury)[2000]
\THICKLINES
\drawvertex\photon[\SE 3](0,8000)[5]
\drawline\fermion[\W\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\N\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\NE\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\SE\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\SW\REG](\vertexthreex,\vertexthreey)[2000]
\drawline\fermion[\SE\REG](\vertexthreex,\vertexthreey)[2000]

\flipvertex\drawvertex\photon[\SE 3](18000,8000)[5]
\drawline\fermion[\W\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\N\REG](\vertexonex,\vertexoney)[2000]
\drawline\fermion[\NE\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\SE\REG](\vertextwox,\vertextwoy)[2000]
\drawline\fermion[\SW\REG](\vertexthreex,\vertexthreey)[2000]
\drawline\fermion[\SE\REG](\vertexthreex,\vertexthreey)[2000]

\end{picture}
\vskip 0.8in
\bs flipvertex may be used with any other options, such as \bs THICKLINES,
as demonstrated above, and features yet to be presented (\bs linkvertices,
\bs vertexcap \etc).
