refactored get_triangle_nodes to use get_triangle_edges