3 ms·
Maybe you could simply check whether the graph is planar?
by joelthelion 13y ago
Maybe you could simply check whether the graph is planar?
- michaelfeathers 13y agoThought of that, but then there's the aesthetics. Perhaps, the answer is drop user-guided drawing and have an algorithm determine whether it is planar and do the routing. But, I still like the idea of user-guided drawing.
- siddboots 13y agoA user-guided force layout and the algorithmic check would be fine aesthetically if it were implemented well. For one thing, it would bring more attention to the mathematical abstraction by removing an unnecessary degree of freedom. Seems like the sort of thing that some clever hacker could put together in a d3 fiddle.
- Someone 13y agoThat's insufficient. If you call enclosed areas (including the one 'at the putside') faces, you sometimes can draw an edge A-B either through face F or through face G. For example, in http://en.wikipedia.org/wiki/File:Brussel_Sprouts_Game.png http://en.wikipedia.org/wiki/File:Brussel_Sprouts_Game.png, position 3, you can draw a 'diagonal' vertically through the large enclosed area, but you can also draw a graph edge between the same two vertices 'around the outside'. Similarly, you can have disconnected parts of the graph, where it is essential to know in what 'face' they lie. For example, starting with 3 points A, B, and C, draw a circular edge from A to itself. There are two ways to do that, one where B and C end up in the same face and one where they do not. If you store the graph as a pair (V,E), you lose that information.