e^n has asked for the wisdom of the Perl Monks concerning the following question:
However, I am running into issues with intersections which I am ill prepared to handle. The code initially takes a map similar to this and translates it into this
As you can see, there are several node placements which result in edge intersections which I have highlighted. Graph::Layout::Aesthetic has forces to combat this but they seem to assume the graph is planar which it often isn't. The only solution I have been able to devise so far is the following:
I came up with a reasonably viable recursive algorithm but could envision no manner of intelligently moving nodes to reduce intersections (anything I tried went crazy).
Essentially what I am looking for is the most efficient way to reduce the number of intersections while keeping the nodes in as close to their original positions as possible. Thanks for your advice!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Aesthetic map layout using Graph::Layout::Aesthetic and problems with intersections.
by Anno (Deacon) on Sep 06, 2007 at 20:33 UTC | |
|
Re: Aesthetic map layout using Graph::Layout::Aesthetic and problems with intersections.
by blokhead (Monsignor) on Sep 07, 2007 at 14:47 UTC | |
|
Re: Aesthetic map layout using Graph::Layout::Aesthetic and problems with intersections.
by SuicideJunkie (Vicar) on Sep 07, 2007 at 14:11 UTC |