For one of the embedding of a planar graph, only one face is the exterior face which contain the ∞
point. In the example as below, the {1, 3, 4, 5, 3, 2}
is such face. We know that it is not always the largest list, how to automatic remove such face does not depend on the area is difficult for me. ( The pink polygon is the largest polygon in this example )
Clear["Global`*"];
SeedRandom[123];
g = Graph[{1, 2, 3, 4, 5},
UndirectedEdge @@@ {{1, 2}, {1, 3}, {2, 3}, {3, 4}, {4, 5}, {5, 3}},
VertexLabels -> Automatic]
coords = GraphEmbedding[g];
faces = PlanarFaceList[g];
vertexs2coords = AssociationThread[VertexList[g] -> coords];
figs = Graphics /@ ({RandomColor[], Polygon@#} & /@ faces /.
vertexs2coords)
{Show[figs], Show[figs[[1]], figs[[3]]]}