pyfeyn2.auto.position.auto_align

pyfeyn2.auto.position.auto_align(fd, positions, legs=True, vertices=True)[source]

Automatically position the vertices and legs on a list of positions.

Parameters:
  • fd (FeynmanDiagram) – The Feynman diagram to be positioned.

  • positions (list of tuple) – A list of tuples of the form (x,y) with the positions of the vertices and legs.

  • legs (bool, optional) – Whether to position the legs, by default True

  • vertices (bool, optional) – Whether to position the vertices, by default True

Returns:

The Feynman diagram with the vertices and legs positioned.

Return type:

FeynmanDiagram