pyfeyn2.render.pyx.points.Point

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

Bases: object

Base class for all pointlike objects in Feynman diagrams.

__init__(x, y, blob=None, labels=None, **kwargs)[source]

Constructor.

Methods

__init__(x, y[, blob, labels])

Constructor.

addLabel(text[, displace, angle, size])

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

arg(otherpoint)

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

distance(otherpoint)

Calculate the distance between this point and the argument.

draw(canvas)

Do nothing (abstract base class).

getBlob()

Get the attached blob.

getPath()

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

getX()

Return the x-coordinate of this point.

getXY()

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

getY()

Return the y-coordinate of this point.

intercept(otherpoint)

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

midpoint(otherpoint)

Return the point midway between this point and the argument.

removeLabels()

Remove all labels from this point.

setBlob(blob)

Set the attached blob.

setX(x)

Set the x-coordinate of this point.

setXY(xpos, ypos)

Set the x and y coordinates of this point.

setY(y)

Set the y-coordinate of this point.

tangent(otherpoint)

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

x()

Alias for getX().

xy()

Alias for getXY().

y()

Alias for getY().

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

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

arg(otherpoint)[source]

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

distance(otherpoint)[source]

Calculate the distance between this point and the argument.

draw(canvas)[source]

Do nothing (abstract base class).

getBlob()[source]

Get the attached blob.

getPath()[source]

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

getX()[source]

Return the x-coordinate of this point.

getXY()[source]

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

getY()[source]

Return the y-coordinate of this point.

intercept(otherpoint)[source]

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

midpoint(otherpoint)[source]

Return the point midway between this point and the argument.

removeLabels()[source]

Remove all labels from this point.

setBlob(blob)[source]

Set the attached blob.

setX(x)[source]

Set the x-coordinate of this point.

setXY(xpos, ypos)[source]

Set the x and y coordinates of this point.

setY(y)[source]

Set the y-coordinate of this point.

tangent(otherpoint)[source]

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

x()[source]

Alias for getX().

xy()[source]

Alias for getXY().

y()[source]

Alias for getY().