Re: [sage-support] Re: Planar graph drawing

2015-10-19 Thread Nathann Cohen
Hellooo, > You are right in that the drawings output by sage do not correspond to the > planar embedding. The get_embedding method says vertices are ordered in > clockwise order whereas the drawing output by sage displays them in > counter-clockwise order. Oh. So you say that we should

[sage-support] Re: Planar graph drawing

2015-10-19 Thread Dominique Laurain
Hello Nathann, Thanks again.. Yesterday evening I made a pause about my sagemath worries...and read (again) one math paper...including Schnyder woods, and once again authors are requiring that the graph is "maximum planar" (or "triangulated") and, as you have discovered, my example is not

[sage-support] Re: Planar graph drawing

2015-10-19 Thread Dominique Laurain
"Change the doc" yes, I am suggesting that for the planar layout; if the input graph is not maximal planar and you can add a simple function checking that one graph is maximal planar (simple to code : loop on each couple of vertices, and add edge made of this couple, if adding make graph not

[sage-support] Re: Planar graph drawing

2015-10-19 Thread fidelbc
That is a very nice function. One thing to note is that having edges added in this way may bump up the running time above O(n), since we would have to be testing that planarity is preserved after adding a given edge. I do agree that sometimes the drawings output by the planar layout are not

[sage-support] Re: Planar graph drawing

2015-10-19 Thread Dominique Laurain
Boost provides a make_maximal_planar function ... and this function can be parametrized by a addEdgeVisitor http://www.boost.org/doc/libs/1_36_0/libs/graph/doc/make_maximal_planar.html -- You received this message because you are subscribed to the Google Groups "sage-support" group. To

[sage-support] Re: Planar graph drawing

2015-10-19 Thread Dominique Laurain
@fidelbc : I didn't know that condition about m = 3n - 6 ... but now I found it (from Euler formula) for example https://en.wikipedia.org/wiki/F%C3%A1ry%27s_theorem For drawing a planar and not maximal planar graph, a "straight" edge drawing would satisfy me In some papers (for example :

[sage-support] Re: Planar graph drawing

2015-10-19 Thread fidelbc
It is simpler to check if a graph is maximal planar. If you already know the graph is planar, then just check if it has 3n-6 edges. If it does, then it is maximal, otherwise it isn't. What planar layout do you suggest for graphs that are not maximal planar? f On Monday, October 19, 2015 at