示例#1
0
def options_disk(max_size):
    min_r = MIN_SIZE // 2
    max_r = max_size // 2
    return {
        "radius": np.random.randint(min_r, max_r + 1),
        "orient": sh.orientation3()
    }
示例#2
0
def options_square(max_size, fixed_size=False):
    if fixed_size:
        size = max_size
    else:
        size = np.random.randint(MIN_SIZE, max_size + 1)

    return {"size": size, "orient": sh.orientation3()}
示例#3
0
def options_disk(max_size, fixed_size=False):
    min_r = MIN_SIZE // 2
    max_r = max_size // 2
    if fixed_size:
        radius = max_r
    else:
        radius = np.random.randint(min_r, max_r + 1)
    return {"radius": radius, "orient": sh.orientation3()}
示例#4
0
def options_square(max_size):
    return {
        "size": np.random.randint(MIN_SIZE, max_size + 1),
        "orient": sh.orientation3()
    }
示例#5
0
def options_rectangle(max_size):
    return {
        "size": np.random.randint(MIN_SIZE, max_size + 1, size=2),
        "orient": sh.orientation3()
    }
示例#6
0
def options_rectangle(max_size, fixed_size=False):
    if fixed_size:
        size = np.array([max_size for _ in range(2)])
    else:
        size = np.random.randint(MIN_SIZE, max_size + 1, size=2)
    return {"size": size, "orient": sh.orientation3()}
示例#7
0
def options_circle():
    return {
        "radius": np.random.randint(SMALL, LARGE),
        "orient": sh.orientation3()
    }
示例#8
0
def options_rectangle():
    return {
        "size": np.random.randint(SMALL, LARGE, size=2),
        "orient": sh.orientation3()
    }
示例#9
0
def options_square():
    return {
        "size": np.random.randint(SMALL, LARGE),
        "orient": sh.orientation3()
    }