Open fililili opened 1 year ago
If I add one more edge 0 to 3 ( add_edge(3, 0, g);
), we only have three faces. Add one edge will reduce the number of faces.
Here is the code (https://godbolt.org/z/f8dGbeY43)
I think the algorithm can only handle connective graph.
Suppose we have two triangles, one have vertexes 0, 1, 2, the other have vertexes 3, 4, 5, then we use planar_face_traversal to traversal it, we will get 4 faces: New face: 0 1 2 New face: 1 0 2 New face: 3 4 5 New face: 4 3 5 But I think we should only have three faces, we only have three regions in fact. Anybody can explain the result? Here is the code (https://godbolt.org/z/eKKffh1Mx):