def add_tree(): # construct the matrices to be used for the eigendecomposition lfdo = ProofDecoration.tree_string_to_LFDO(g_tree_string) lfdi = ProofDecoration.LFDO_to_LFDI(lfdo) # we need the ordered ids themselves to to construct the edges tree = NewickIO.parse(g_tree_string, FelTree.NewickTree) ordered_ids = ProofDecoration.tree_to_leaf_first_ids(tree) index_edges = get_index_edges(tree, ordered_ids) # define the points X, Y, Z = get_grant_proposal_points_b(lfdi) # draw the image draw_3d_tree(X, Y, Z, index_edges) draw_crossings(X, Y, Z, index_edges)
def get_response_content(fs): # define the requested physical size of the images (in pixels) physical_size = (640, 480) # construct the matrices to be used for the eigendecomposition lfdo = ProofDecoration.tree_string_to_LFDO(fs.tree_string) lfdi = ProofDecoration.LFDO_to_LFDI(lfdo) # we need the ordered ids themselves to to construct the edges tree = NewickIO.parse(fs.tree_string, FelTree.NewickTree) ordered_ids = ProofDecoration.tree_to_leaf_first_ids(tree) index_edges = get_index_edges(tree, ordered_ids) # define the points points = get_grant_proposal_points_b(lfdi) # draw the image ext = Form.g_imageformat_to_ext[fs.imageformat] return get_animation_frame(ext, physical_size, fs.scale, index_edges, points)