bibliopixel/util/util.py
def pointOnCircle(cx, cy, radius, angle):
    """
    Calculates the coordinates of a point on a circle given the center point,
    radius, and angle.
    """
    angle = math.radians(angle) - (math.pi / 2)
    x = cx + radius * math.cos(angle)
    if x < cx:
        x = math.ceil(x)
    else:
        x = math.floor(x)

    y = cy + radius * math.sin(angle)

    if y < cy:
        y = math.ceil(y)
    else:
        y = math.floor(y)

    return (int(x), int(y))
def pointOnCircle(cx, cy, radius, angle):
    """
    Calculates the coordinates of a point on a circle given the center point,
    radius, and angle.
    """
    angle = math.radians(angle) - (math.pi / 2)
    x = cx + radius * math.cos(angle)
    if x < cx:
        x = math.ceil(x)
    else:
        x = math.floor(x)

    y = cy + radius * math.sin(angle)

    if y < cy:
        y = math.ceil(y)
    else:
        y = math.floor(y)

    return (int(x), int(y))
Calculates the coordinates of a point on a circle given the center point,
    radius, and angle.