in reply to Aesthetic map layout using Graph::Layout::Aesthetic and problems with intersections.

Computing the crossing number of a graph (that is, the fewest number of edge intersections needed to draw the graph in the plane) is an NP-complete problem. According to the problem's entry in the compendium of NP-complete problems, there don't appear to be any general approximations either. Ad-hoc heuristics will probably be as good as you can hope for, if you want to be able to handle large, dense graphs efficiently.

Also, when I think about aesthetically pleasing graphs, I think of graphviz. It has a lot of sophisticated logic for laying out vertices, yielding nice-looking results. I don't know if it takes edge crossings into account as part of its measure of graph niceness, but it could be worth a look to see if/how they do it. Graphviz does take liberties about rearranging nodes (in general this is necessary to reduce the crossing number of an embedding), so it might not exactly suit your needs..

blokhead

  • Comment on Re: Aesthetic map layout using Graph::Layout::Aesthetic and problems with intersections.