def polyat(polygon, i):
    """Gets a vertex at position i on the polygon.
    It does not matter if i is out of bounds.

    Input:
        polygon : The polygon
        i : Position desired on the polygon

    Output:
        Vertex at position i
    """
    s = len(polygon)
    return polygon[i % s]