pyfeyn2.render.pyx.points

Various types of points for vertices etc.

Module Contents

Classes

Point

Base class for all pointlike objects in Feynman diagrams.

DecoratedPoint

Class for a point drawn with a marker

Mark

SquareMark

A square mark.

CircleMark

A circular mark.

PolygonalMark

A polygonal mark.

StarshapeMark

A star-shaped mark.

CrossMark

A cross marker, e.g. to show neutrino oscillations.

Functions

midpoint(point1, point2)

Return the point midway between this point and the argument.

distance(point1, point2)

Calculate the distance between this point and the argument.

Attributes

Vertex

CIRCLE

SQUARE

CROSS

TRIANGLE

DIAMOND

PENTAGON

HEXAGON

HEPTAGON

OCTAGON

TETRASTAR

STAR

HEXASTAR

OCTOSTAR

NamedMark

pyfeyn2.render.pyx.points.midpoint(point1, point2)[source]

Return the point midway between this point and the argument.

pyfeyn2.render.pyx.points.distance(point1, point2)[source]

Calculate the distance between this point and the argument.

class pyfeyn2.render.pyx.points.Point(x, y, blob=None, labels=None, **kwargs)[source]

Base class for all pointlike objects in Feynman diagrams.

Constructor.

addLabel(text, displace=0.3, angle=0, size=pyx.text.size.normalsize)[source]

Add a LaTeX label to this point, either via parameters or actually as a PointLable object.

removeLabels()[source]

Remove all labels from this point.

draw(canvas)[source]

Do nothing (abstract base class).

getPath()[source]

Return the path of the attached blob path, if there is one, otherwise None.

midpoint(otherpoint)[source]

Return the point midway between this point and the argument.

distance(otherpoint)[source]

Calculate the distance between this point and the argument.

intercept(otherpoint)[source]

Return the y-intercept of the straight line defined by this point and the argument.

tangent(otherpoint)[source]

Return the tangent of the straight line defined by this point and the argument.

arg(otherpoint)[source]

Return the angle between the x-axis and the straight line defined by this point and the argument (cf. complex numbers).

getBlob()[source]

Get the attached blob.

setBlob(blob)[source]

Set the attached blob.

getX()[source]

Return the x-coordinate of this point.

setX(x)[source]

Set the x-coordinate of this point.

getY()[source]

Return the y-coordinate of this point.

setY(y)[source]

Set the y-coordinate of this point.

getXY()[source]

Return the x and y coordinates of this point as a 2-tuple.

setXY(xpos, ypos)[source]

Set the x and y coordinates of this point.

x()[source]

Alias for getX().

y()[source]

Alias for getY().

xy()[source]

Alias for getXY().

class pyfeyn2.render.pyx.points.DecoratedPoint(x=None, y=None, center=None, mark=None, fill=[BLACK], stroke=[BLACK], blob=None, labels=[], **kwargs)[source]

Bases: Point, pyfeyn2.render.pyx.utils.Visible

Class for a point drawn with a marker

Constructor.

getPath()[source]

Return the path belonging to the blob or marker attached to this point, if any.

getMark()[source]

Return the marker attached to this point.

setMark(mark)[source]

Set the marker attached to this point.

getBlob()[source]

Return the blob attached to this point.

setBlob(blob)[source]

Set the blob attached to this point.

getFillstyles()[source]

Return the fillstyles for the marker or blob attached to this point.

setFillstyles(styles)[source]

Set the fillstyles for the marker or blob attached to this point.

addFillstyles(styles)[source]

Add fillstyles to the marker or blob attached to this point.

addFillstyle(style)[source]

Add a fillstyle to the marker or blob attached to this point.

getStrokestyles()[source]

Return the stroke styles for the marker or blob attached to this point.

setStrokestyles(styles)[source]

Set the stroke styles for the marker or blob attached to this point.

addStrokestyles(styles)[source]

Add stroke styles to the marker or blob attached to this point.

addStrokestyle(style)[source]

Add a stroke style to the marker or blob attached to this point.

draw(canvas)[source]

Draw the marker or blob attached to this point.

pyfeyn2.render.pyx.points.Vertex[source]
class pyfeyn2.render.pyx.points.Mark[source]
getPoint()[source]

Return the point to which this marker is attached.

setPoint(point)[source]

Attach this marker to a new point.

class pyfeyn2.render.pyx.points.SquareMark(size=0.075)[source]

Bases: Mark

A square mark.

getPath()[source]

Return the path for this marker.

class pyfeyn2.render.pyx.points.CircleMark(size=0.075)[source]

Bases: Mark

A circular mark.

getPath()[source]

Return the path for this marker.

class pyfeyn2.render.pyx.points.PolygonalMark(size=0.075, corners=3)[source]

Bases: Mark

A polygonal mark.

getPath()[source]

Return the path for this marker.

class pyfeyn2.render.pyx.points.StarshapeMark(size=0.075, raysize=0.05, rays=3)[source]

Bases: Mark

A star-shaped mark.

getPath()[source]

Return the path for this marker.

class pyfeyn2.render.pyx.points.CrossMark(size=0.075)[source]

Bases: Mark

A cross marker, e.g. to show neutrino oscillations.

getPath()[source]

Return the path for this marker.

pyfeyn2.render.pyx.points.CIRCLE[source]
pyfeyn2.render.pyx.points.SQUARE[source]
pyfeyn2.render.pyx.points.CROSS[source]
pyfeyn2.render.pyx.points.TRIANGLE[source]
pyfeyn2.render.pyx.points.DIAMOND[source]
pyfeyn2.render.pyx.points.PENTAGON[source]
pyfeyn2.render.pyx.points.HEXAGON[source]
pyfeyn2.render.pyx.points.HEPTAGON[source]
pyfeyn2.render.pyx.points.OCTAGON[source]
pyfeyn2.render.pyx.points.TETRASTAR[source]
pyfeyn2.render.pyx.points.STAR[source]
pyfeyn2.render.pyx.points.HEXASTAR[source]
pyfeyn2.render.pyx.points.OCTOSTAR[source]
pyfeyn2.render.pyx.points.NamedMark[source]