def GetPointsAtRadius(arr_shape, x, y, r):
    """Create a binary image of a circle radius r"""
    w, h = arr_shape
    r2 = int(r ** 2)
    l = []
    for i in range(int(x - r), int(x + r + 1)):
        for j in range(int(y - r), int(y + r + 1)):
            if (i - x) ** 2 + (j - y) ** 2 < r2:
                if 0 <= i < w and 0 <= j < h:
                    l += [[i, j]]
    return l
