Example #1
0
def _pod_wedge_info(pod: PodState) -> Tuple[float, float, Vec2]:
    """
    Get info for drawing a wedge for ta pod:
    angle from, angle to, center
    """
    angle_deg = math.degrees(pod.angle) + 180.0
    offset = Vec2(Constants.pod_radius() / 2,
                  0).rotate(math.radians(angle_deg))
    center = pod.pos - offset
    return angle_deg - 20, angle_deg + 20, center
Example #2
0
def _get_pod_artist(pod: PodState, color: Tuple[float, float, float]) -> Wedge:
    # Draw the wedge
    theta1, theta2, center = _pod_wedge_info(pod)
    wedge = Wedge((center.x, center.y),
                  Constants.pod_radius(),
                  theta1,
                  theta2,
                  color=color)
    wedge.set_zorder(10)
    return wedge