Example #1
0
    def __init__(self, coxeter_diagram, init_dist):
        if len(coxeter_diagram) != 6 or len(init_dist) != 4:
            raise ValueError("Invalid input dimension")

        # Coxeter matrix and its rank
        self.cox_mat = helpers.make_symmetry_matrix(coxeter_diagram)
        self.rank = len(self.cox_mat)

        # generators of the symmetry group
        self.gens = tuple(range(self.rank))

        # symmetry group of this tiling
        self.G = CoxeterGroup(self.cox_mat)

        # a mirror is active iff the initial point is not on it
        self.active = tuple(bool(x) for x in init_dist)

        # reflection mirrors
        self.mirrors = self.get_mirrors(coxeter_diagram)

        # reflections (possibly affine) about the mirrors
        self.reflections = self.get_reflections()

        # coordinates of the initial point
        self.init_v = self.get_init_point(init_dist)

        self.edge_hash_set = set()

        self.num_vertices = 0
        self.num_edges = 0
Example #2
0
    def __init__(self, cox_mat, v0, active, reflections):
        self.cox_mat = cox_mat
        self.v0 = v0
        self.active = active
        self.reflections = reflections
        self.G = CoxeterGroup(cox_mat)

        self.vertices_coords = []
        self.num_vertices = None
        self.edge_coords = []
        self.num_edges = None
Example #3
0
def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("filename", help="Coxeter matrix data file")
    args = parser.parse_args()
    cox_mat = np.loadtxt(args.filename, dtype=np.int, delimiter=" ")
    print("Computing the shorlex DFA for Coxeter group:")
    print(cox_mat)
    G = CoxeterGroup(cox_mat).init()
    print("The minimal DFA contains {} states".format(G.dfa.num_states))
    imgname = os.path.splitext(os.path.basename(args.filename))[0] + ".png"
    G.dfa.draw(imgname)
Example #4
0
    def __init__(self, coxeter_diagram, init_dist):
        if len(coxeter_diagram) != 3 or len(init_dist) != 3:
            raise ValueError("Invalid input dimension")

        self.diagram = coxeter_diagram

        # Coxeter matrix and its rank
        self.cox_mat = helpers.get_coxeter_matrix(coxeter_diagram)
        self.rank = len(self.cox_mat)

        # generators of the symmetry group
        self.gens = tuple(range(self.rank))

        # symmetry group of this tiling
        self.G = CoxeterGroup(self.cox_mat)

        # a mirror is active iff the initial point is not on it
        self.active = tuple(bool(x) for x in init_dist)

        # reflection mirrors
        self.mirrors = self.get_mirrors(coxeter_diagram)

        # reflections (possibly affine) about the mirrors
        self.reflections = self.get_reflections()

        # coordinates of the initial point
        self.init_v = self.get_init_point(init_dist)

        # vertices of the fundamental triangle
        self.triangle_verts = self.get_fundamental_triangle_verts()

        # ----------------------
        # to be calculated later
        # ----------------------

        # holds the words in the symmetry group up to a given depth
        self.words = None

        # holds the coset representatives of the standard parabolic
        # subgroup of vertex-stabilizing subgroup
        self.vwords = None

        self.vertices_coords = []
        self.num_vertices = None
        self.num_edges = None
        self.num_faces = None
        self.edge_indices = {}
        self.face_indices = {}
Example #5
0
    def __init__(self, coxeter_diagram, init_dist):
        self.cox_mat = helpers.get_coxeter_matrix(coxeter_diagram)
        self.G = CoxeterGroup(self.cox_mat)
        self.active = tuple(bool(x) for x in init_dist)
        self.words = None

        self.mirrors = self.get_mirrors(coxeter_diagram)
        self.init_v = helpers.get_point_from_distance(self.mirrors, init_dist)
        self.reflections = self.get_reflections(init_dist)

        # to be calculated later
        self.vertices_coords = []
        self.num_vertices = None
        self.num_edges = None
        self.num_faces = None
        self.edge_indices = {}
        self.face_indices = {}