Over the last couple of months, together with a couple of other people, I have been working on model visualization tooling, based on GraphViz and ZEST. However, the layout algorithms that come with these tools aren't as good as I'd like them to be; specifically, the algorithms in ZEST don't avoid node overlaps and aren't robust with regard to adding a few new nodes (i.e. the layout can change completely if you add new nodes).
A while ago I had the idea of using numerical simulations for layouting. Each node is assigned a negative charge (i.e. nodes repel each other) and the connections act as springs (i.e. they create a pull force between them). Doing an interative numerical simulation of the forces between them should result in a nice layout. That was the idea.
Since I couldn't convince somebody else to try this out, I had to do it myself :-) Here are the preliminary results.
I built this thing "from scratch" using Scala and Java2D. I think the results are convincing. The next steps would be to either integrate a layout along these lines into ZEST or to enhance my prototype to become a complete Eclipse-based model visualization solution.
I'd prefer the first alternative. Anybody interesting in integrating this approach into ZEST?
Markus, this looks really nice. For me it is disturbing that the particles keep moving. Maybe some positions can be fixed once a "good" layout was found?
adding charge to springs is not that easy. All charges are currently simulated as point-charges. If I wanted to charge the line, I'd have to make it a sequence of charged points along the line. That makes it very compute-extensive. Also, the questions is where the lines would go if they don't overlap. I'd have to make them flexible (some kind of curve). Not sure all of this is feasible :-)