asked 1 year ago
Is there any method to get all faces of a planar graph?
Check method faces
faces
sage: G = graphs.Grid2dGraph(3, 3) sage: G.faces() [[((0, 0), (0, 1)), ((0, 1), (0, 2)), ((0, 2), (1, 2)), ((1, 2), (2, 2)), ((2, 2), (2, 1)), ((2, 1), (2, 0)), ((2, 0), (1, 0)), ((1, 0), (0, 0))], [((0, 0), (1, 0)), ((1, 0), (1, 1)), ((1, 1), (0, 1)), ((0, 1), (0, 0))], [((0, 1), (1, 1)), ((1, 1), (1, 2)), ((1, 2), (0, 2)), ((0, 2), (0, 1))], [((1, 0), (2, 0)), ((2, 0), (2, 1)), ((2, 1), (1, 1)), ((1, 1), (1, 0))], [((1, 1), (2, 1)), ((2, 1), (2, 2)), ((2, 2), (1, 2)), ((1, 2), (1, 1))]]
How can I get the embedding? so how does the faces() work?
Run G.is_planar(set_embedding=True) followed by G.get_embedding().
G.is_planar(set_embedding=True)
G.get_embedding()
Please start posting anonymously - your entry will be published after you log in or create a new account.
Add Answer
subscribe to rss feed
Asked: 1 year ago
Seen: 446 times
Last updated: Jun 02 '23
Sage and planar graphs
Generating plane triangulations
embed planar graph with prescribed outer face
Combinatorial data for planar graph
set external_face layout_planar
How do I get the external face of a planar embedded graph?
How do I implement plantri in sagemath
Drawing a planar multigraph with loops
graphs.planar_graphs
Output of plantri and graphs.planar_graphs
Check method
faces
How can I get the embedding? so how does the faces() work?
Run
G.is_planar(set_embedding=True)
followed byG.get_embedding()
.