Feynman

https://github.com/GkAntonius/feynman

http://gkantonius.github.io/feynman/index.html

[1]:
from pyfeyn2.feynmandiagram import FeynmanDiagram, Leg, Propagator, Vertex
from pyfeyn2.render.mpl.feynmanrender import FeynmanRender
from pyfeyn2.render.latex.dot import feynman_adjust_points
import pyfeyn2
print(pyfeyn2.__version__)
[2]:

v1 = Vertex(x=0.3,y=0.4) v2 = Vertex(x=0.5,y=0.4) fd = FeynmanDiagram().add( v1,v2, Propagator(type="photon",label=r"$\gamma$").connect(v1, v2), Leg(type="fermion",label=r"$\chi$").with_target(v1).with_xy(0.2, 0.5).with_incoming(), Leg(type="fermion").with_target(v1).with_xy(-0, 0.3).with_incoming(), Leg(type="fermion").with_target(v2).with_xy(0.6, 0.5).with_outgoing(), Leg(type="fermion").with_target(v2).with_xy(1.0, 0.3).with_outgoing() ) FeynmanRender(fd).render(show=True)
../../../_images/renderers_mpl_feynman_feynman_2_0.png
[ ]:

[ ]: