コード例 #1
0
def str2mtg(s):
    #s = s.replace('N', 'F')
    tree = AxialTree(s)
    l = Lsystem()
    l.addInterpretationRule('N --> F', 0)
    geom_tree = l.homomorphism(tree)
    scene = l.sceneInterpretation(geom_tree)
    scale = dict(list(zip(('P', 'A', 'N', 'L', 'F'), (1, 2, 3, 3, 3))))
    mtg = axialtree2mtg(tree, scale, scene)
    return tree, mtg, scene
コード例 #2
0
def str2mtg(s):
    #s = s.replace('N', 'F')
    tree = AxialTree(s) 
    l = Lsystem()
    l.addInterpretationRule('N --> F', 0)
    geom_tree = l.homomorphism(tree)
    scene = l.sceneInterpretation(geom_tree)
    scale = dict(zip(('P','A','N', 'L', 'F'),(1,2,3,3,3)))
    mtg = axialtree2mtg(tree, scale, scene)
    return tree, mtg, scene