<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%                       GLUONLINKS.TEX (FEB. 5, 1989)
%  CALLED BY FEYNMAN(34).TEX.
%
%  Routines for drawing GLUON LINKS and GLUON CAPS used by FEYNMAN.TEX.
%  Formerly in separate files (GLUONLINKS &amp; GLUONCAPS).
%  This file is read in when \gluonlink, \gluoncap, defined in GLUONSETUP(21+),
%  and related commands (in \drawvetex) are used.
%
%  GLUON LINKS are used to link \CENTRAL-type gluon lines together 
%  (eg: \REG &amp; \FLIPPED gluons drawn diagonally).
%  Syntax:   \drawline\gluon[\W\CENTRAL](x,y)[number of loops]\gluonlink
%            \drawline\gluon[\W\CENTRAL](\pbackx,\pbacky)[number of loops]
%
%  GLUON CAPS are used on vertical and horizontal gluons to make the
%  terminus of the gluon line end along the gluon axis.  It then draws
%  a stem of length \stemlength (as though the command \BACKSTEMMED had
%  been issued).  Principal use is when \drawvertex is used.
%  Syntax:   \drawline\gluon[\W\FLAT](x,y)[number of loops]\gluoncap
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                           %
%                                                                           %
%                                GLUON LINKS                                %
%                                                                           %
%                                                                           %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%        ROUTINE FOR LINKING \CENTRAL AND \FLIPPEDCENTRAL GLUONS
%
\gdef\gluonlink{
\global\stemlengthx=401 \SETDIR \setadjxy \divide\adjx by -2 \divide\adjy by -2
\ifcase\LDIR  
     \linksetupB \ifodd\LCONFIG\LINKPUT[l]  \else\LINKPUT[r] \fi %\Ngluon
\or  \ifodd\LCONFIG \linksetupBx \LINKPUT[tr]\LINKPUT[l]         %\NEgluon
     \else          \linksetupBy \LINKPUT[tr]\LINKPUT[b]     \fi
\or  \linksetupB \ifodd\LCONFIG\LINKPUT[t]  \else\LINKPUT[b] \fi %\Egluon
\or  \ifodd\LCONFIG \linksetupBy \LINKPUT[br]\LINKPUT[t]         %\SEgluon
     \else          \linksetupBx \LINKPUT[br]\LINKPUT[l]     \fi
\or  \linksetupB \ifodd\LCONFIG\LINKPUT[r]  \else\LINKPUT[l] \fi %\Sgluon
\or  \ifodd\LCONFIG \linksetupBx \LINKPUT[bl]\LINKPUT[r]         %\SWgluon
     \else          \linksetupBy \LINKPUT[bl]\LINKPUT[t]     \fi
\or  \linksetupB \ifodd\LCONFIG\LINKPUT[b]  \else\LINKPUT[t] \fi %\Wgluon
\or  \ifodd\LCONFIG \linksetupBy \LINKPUT[tl]\LINKPUT[b]         %\NWgluon
     \else          \linksetupBx \LINKPUT[tl]\LINKPUT[r]     \fi
\else \UNIMPERROR 
\fi
\ifodd\LDIR\relax 
\else \global\advance\pbackx by \adjx   \global\advance\pbacky by \adjy \fi
\linksetupC
}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                           %
%                                                                           %
%                                GLUONCAPS                                  %
%                                                                           %
%                                                                           %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%            ROUTINE FOR CENTRALIZING/CAPPING GLUONS
%
\gdef\gluoncap{  % For centralizing gluons
\global\stemlengthx=0  
\ifodd\LDIR\message{NOTE:  Diagonal Gluons are not Capped}\relax
\else
\ifcase\LCONFIG \global\stemlengthx=1000  %\REG case for NSEW
\or \global\stemlengthx=1000  %\FLIPPED case (NSEW)
\or \global\stemlengthx=825   %\CURLY case (NSEW)
\or \global\stemlengthx=825   %\FLIPPEDCURLY  case (NSEW)
\or \global\stemlengthx=1030  %\FLAT case (NSEW)
\or \global\stemlengthx=1030  %\FLIPPEDFLAT case (NSEW)
\or \global\stemlengthx=0     %\CENTRAL case (NSEW)
\or \global\stemlengthx=0     %\FLIPPEDCENTRAL case (NSEW)
\or \global\stemlengthx=800   %\SQUASHED case (NSEW)
\else\UNIMPERROR
\fi % end \ifcase\LCONFIG
\ifnum\stemlengthx&gt;400
\global\advance\LDIR by 2 \moduloeight\LDIR   \SETDIR 
\global\advance\LDIR by 6 \moduloeight\LDIR   \setadjxy
\ifodd\LCONFIG \multiply \adjx by -1   \multiply \adjy by -1 \fi
\divide\adjx by 2  \divide\adjy by 2 \linksetupB
\ifcase\LDIR 
     \ifodd\LCONFIG\LINKPUT[tr]  \else\LINKPUT[tl]   \fi   %\NGLUON
\or  \relax % \NEGLUON
\or  \ifodd\LCONFIG\LINKPUT[br]  \else\LINKPUT[tr]   \fi   %\Egluon
\or  \relax % \SEgluon
\or  \ifodd\LCONFIG\LINKPUT[bl]  \else\LINKPUT[br]   \fi   %\Sgluon
\or  \relax % \SWgluon
\or  \ifodd\LCONFIG\LINKPUT[tl]  \else\LINKPUT[bl]   \fi   %\Wgluon
\or  \relax % \NWgluon
\else \UNIMPERROR 
\fi
\linksetupD
\else\message{* NOTE:  Attempt to use gluoncap of less that 401 centipoints *}
\fi % End of \ifnum\stemlengthx
\fi % end \ifodd
}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                           %
%                                                                           %
%       AUXILIARY ROUTINES USED BY BOTH \gluonlink and \gluoncap            %
%                                                                           %
%                                                                           %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\gdef\setadjxy{
\adjx=\stemlengthx   \adjy=\stemlengthx % Yes, it's `x', not `y'.
\multiply \adjx by \XDIR%  
\multiply \adjy by \YDIR%  
}
\gdef\advancegluonlength{
\global\advance\particlelengthx by \adjx \global\advance\particlelengthy by\adjy
\global\advance\gluonlengthx by \adjx  \global\advance\gluonlengthy by \adjy
% The new adjusted gluon lengths.
}
\gdef\LINKPUT[#1]{\ifnum\phantomswitch=0\put(\gluonbackx,\gluonbacky)
{\oval(\stemlengthx,\stemlengthx)[#1]}\fi}  
\gdef\linksetupBx{\global\advance\gluonbackx by \adjx}
\gdef\linksetupBy{\global\advance\gluonbacky by \adjy}
\gdef\linksetupB{\linksetupBx\linksetupBy}
\gdef\linksetupC{
\global\advance\pbackx by \adjx  \global\advance\pbacky by \adjy
\global\gluonbackx=\pbackx   \global\gluonbacky=\pbacky
% Take negative particle lengths into account.  \BOXLENGTHX,Y remain as before.
\ifnum\plengthx&lt;0 \multiply\adjx by -1 \fi
\ifnum\plengthy&lt;0 \multiply\adjy by -1 \fi
\advancegluonlength
}
\gdef\linksetupD{
\linksetupC
\SETDIR 
\setadjxy
\divide\adjx by 2  \divide\adjy by 2 \linksetupB
\global\pbackx=\gluonbackx   \global\pbacky=\gluonbacky
\advancegluonlength
\ifnum\phantomswitch=0\put(\pbackx,\pbacky){\line(\XDIR,\YDIR){\stemlength}}\fi
\stemlengthx=\stemlength  %TESTING
\setadjxy
\global\advance\pbackx by \adjx  \global\advance\pbacky by \adjy
\global\gluonbackx=\pbackx   \global\gluonbacky=\pbacky
\advancegluonlength
% The new adjusted gluon lengths and rear positions
}
</pre></body></html>