def METHOD_NAME(w, h, tile, ratio, angle, d):
    ca = math.cos(angle)
    sa = math.sin(angle)
    b = tile * ratio
    i = np.tile(np.arange(w), (h, 1))
    j = np.transpose(np.tile(np.arange(h), (w, 1)))
    x = i * ca - j * sa
    y = i * sa + j * ca
    m = np.logical_or(((x + d) % tile > b + 2 * d), ((y + d) % tile > b + 2 * d))
    return m