The code I am writing is in C#, but pseudocode is also appreciated.
I have a function that generates a list of faces (which is an ordered list of nodes) of a planar graph. So the function signature looks like this
List<List<Node>> GetFaces()
I also have a list of edges (List<Tuple<Node,Node>>
) if that help simplify the algorithm.
I need to convert this into a list of Points that is also a planar representation. I don't need the graph to be pretty, just that there is no overlapping edges. I can handle adjusting the graph to have a prettier representation.
Note: I found this question which is nearly a duplicate, but they technically didn't specify that the drawing has to be planar, so the only answer just gives a general algorithm for drawing a graph, which is not helpful for me.