Skip to content

feyn.gle

Drawing Feynman diagrams, version 1.2

for documentation see

Drawing Feynman diagrams with GLE,

Comp. Phys. Commun. 283 (2023) 108590

[https://arxiv.org/abs/2207.01351]

new features in the version 1.2:

https://arxiv.org/abs/2611.29526

variable names beginning with F are reserved for internal use

     straight line | arc

fr - -1 | radius

fx,fy - initial point | center

fa - slope | slope: center->initial

fl - length | angle length

fc - | +1 - counterclockwise

fsx,fsy - | starting point for Feyn2 functions

fxx,fyy - | intermediate points for Feyn2 functions

ffx,ffy - final point

fx1,fy1,... - temporary coordinates

f1,f2,... - temporary variables

fi,fm,fd - for loops

fcirc - the arc is a circle

sin table

Setup

internal - setup for straight line

sub Feyn x y
+1 counterclockwise

-1 clockwise

internal - setup for circle

sub FeynC x y
internal - setup for arc

sub Feyn2 xx yy x y

Fermion line

Fermion line from the current point to x,y

sub Fermion x y
Fermion line - circle with the center x,y

sub FermionC x y
Fermion line from the current point via xx,yy to x,y

sub Fermion2 xx yy x y
Double line from the current point to x,y

sub Double x y
Double line - circle with the center x,y

sub DoubleC x y
Double line from the current point via xx,yy to x,y

sub Double2 xx yy x y

Dashed line

DashB>0: the line begins with a dash of the length DashBDashFDashL

DashB<0: the line begins with a gap of the length -DashB(1-DashF)DashL

DashE: similarly

Calculate fn

sub DashCalc0 fdl
Calculate fd, fm, f1, f2

sub DashCalc1 ffl

sub Dash1 ffl
Higgs (dashed) line from the current point to x,y

sub Dash x y

sub Dash0 ffr ffl ffa
Higgs (dashed) line - circle with the center x,y

sub DashC x y
Higgs (dashed) line from the current point via xx,yy to x,y

sub Dash2 xx yy x y
Double dashed line

sub DDash x y
Double dashed line - circle

sub DDashC x y
Double dashed line - arc

sub DDash2 xx yy x y

Vertices

Vertex at the current point

sub Vert
Regular polygon

sub PVert n
Set color of both lines and filled circles

sub SetColor col$

Dotted line

Dotted line from the current point to x,y

sub Dots x y

sub Dots0 ffr ffl ffa
Dotted line - circle with the center x,y

sub DotsC x y
Dotted line from the current point via xx,yy to x,y

sub Dots2 xx yy x y
Double dotted line

sub DDots x y
Double dotted line - circle

sub DDotsC x y
Double dotted line - arc

sub DDots2 xx yy x y

Zigzag line

Vector boson (zigzag) line from the current point to x,y

sub Zigzag x y

sub Zigzag0 ffr
Vector boson (zigzag) line - circle with the center x,y

sub ZigzagC x y
Vector boson (zigzag) line from the current point via xx,yy to x,y

sub Zigzag2 xx yy x y
Double zigzag line

sub DZigzag x y
Double zigzag line - circle

sub DZigzagC x y
Double zigzag line - arc

sub DZigzag2 xx yy x y

Photon line

Photon line from the current point to x,y

sub Photon x y

sub Photon0 ffr
Photon line - circle with the center x,y

sub PhotonC x y
Photon line from the current point via xx,yy to x,y

sub Photon2 xx yy x y
Double photon line

sub DPhoton x y

sub DPhoton0
Double photon line - circle

sub DPhotonC x y
Double photon line - arc

sub DPhoton2 xx yy x y

Gluon line

1 - the ends are "symmetric"

-1 - the ends are "different"

Gluon line from the current point to x,y

sub Gluon x y

sub Gluon0
Gluon line - circle with the center x,y

sub GluonC x y
Gluon line from the current point via xx,yy to x,y

sub Gluon2 xx yy x y

Combined lines

sub FZigzag x y
sub FZigzag2 xx yy x y
sub FZigzagC x y
sub FPhoton x y
sub FPhoton2 xx yy x y
sub FPhotonC x y
sub FGluon x y
sub FGluon2 xx yy x y
sub FGluonC x y

Pattern line

sub Pattern1 ffl
Pattern line

sub Pattern x y

sub Pattern0 ffr ffl ffa
Pattern line - circle

sub PatternC x y
Pattern line - arc

sub Pattern2 xx yy x y
Double pattern line

sub DPattern x y
Double pattern line - circle

sub DPatternC x y
Double pattern line - arc

sub DPattern2 xx yy x y

Arrows

Arrow on the last line, fraction f from the beginning

sub Arrow f
Dot on the last line, fraction f from the beginning

sub LDot f
Arrow for indication of momentum near the last line

sub Mom f
Double arrow near the last line

sub DMom f
Arc-shaped arrow for indication of momentum near the last line

sub Mom2 f
Arc-shaped double arrow near the last line

sub DMom2 f