aquaduct.apps.chord module

hex2rgb(color)[source]

Convert HEX color to RGB format. :param color: String hex color. :return: Tuple with RGB values.

polar2point(angle, r)[source]

Transform polar coordinates to cartesian coordinates. :param angle: Angle. :param r: Radius.

generate_arc(r, sa, ea, max_angle=5, reversed_=False)[source]

Generate arc vertrices with control points for quadratic Bezier curve.

Parameters
  • r – Radius

  • sa – Start angle.

  • ea – End angle

  • max_angle – Max. angle for which control point will be calculated. If > 90 curves will be significantly distorted.

  • reversed – If True vertices will start from ea.

If ea - sa > max_angle, then ea - sa will be divided by max_angle into parts and control point will be calculated for each part.

class Node(r, sa, ea, color)[source]

Bases: matplotlib.patches.PathPatch

Bases: matplotlib.patches.PathPatch

class Arrow(r, sa, ea, color, max_angle=45)[source]

Bases: matplotlib.patches.PathPatch