Example #1
0
def Create46_12(depth, seed=None):
    c4 = TilingConstraint(4)
    c6 = TilingConstraint(6)
    c12 = TilingConstraint(12)

    c4.set_neighbours([c6, c12], 2)
    c6.set_neighbours([c4, c12], 3)
    c12.set_neighbours([c4, c6], 6)

    c4.set_constraint(c6, 1, -1, -1)
    c4.set_constraint(c6, -1, 1, 1)
    c4.set_constraint(c12, 1, -1, -1)
    c4.set_constraint(c12, -1, 1, 1)

    c6.set_constraint(c4, 1, -1, -1)
    c6.set_constraint(c4, -1, 1, 1)
    c6.set_constraint(c12, 1, -1, -1)
    c6.set_constraint(c12, -1, 1, 1)

    c12.set_constraint(c4, 1, -1, -1)
    c12.set_constraint(c4, -1, 1, 1)
    c12.set_constraint(c6, 1, -1, -1)
    c12.set_constraint(c6, -1, 1, 1)

    return TileGrid(c12, depth, 1.0, seed=seed, createID="Create46_12")
Example #2
0
def Create666(depth, seed=None):
    hex_constr = TilingConstraint(6)
    hex_constr.set_neighbours([hex_constr], 6)
    hex_constr.set_constraint(hex_constr, 1, -1, -1)
    hex_constr.set_constraint(hex_constr, -1, 1, 1)

    tg = TileGrid(hex_constr, depth, 1.0, seed=seed, createID="Create666")

    return tg
Example #3
0
def Create33333(depth, seed=None):
    tri_constr = TilingConstraint(3)

    tri_constr.set_neighbours([tri_constr], 3)

    tri_constr.set_constraint(tri_constr, 1, -1, -1, -1, -1)
    tri_constr.set_constraint(tri_constr, -1, 1, 1, 1, 1)

    tile = TileGrid(tri_constr, depth, 1.0, seed=seed, createID="Create33333")

    return tile
Example #4
0
def Create4444(depth, seed=None):
    sq_constr = TilingConstraint(4)

    sq_constr.set_neighbours([sq_constr], 4)

    sq_constr.set_constraint(sq_constr, 1, -1, -1, -1)
    sq_constr.set_constraint(sq_constr, -1, 1, 1, 1)

    tile = TileGrid(sq_constr, depth, 1.0, seed=seed, createID="Create4444")

    return tile
Example #5
0
def Create33434(depth, seed=None):
    c3 = TilingConstraint(3)  #broken
    c4 = TilingConstraint(4)

    c3.set_neighbours([c3, c4, c4], 1)
    c4.set_neighbours([c3], 4)

    c3.set_constraint(c4, -1, 1, 1, 1, 1)
    c3.set_constraint(c4, 1, -1, -1, -1, -1)
    c3.set_constraint(c3, 1, -1, -1, -1, -1)
    c3.set_constraint(c3, -1, 1, 1, 1, 1)
    c4.set_constraint(c3, -1, 1, 1, 1, 1)
    c4.set_constraint(c3, 1, -1, -1, -1, -1)

    return TileGrid(c4, depth, 1.0, seed=seed, createID="Create33434")