Friday, 15 October 2010

It lives!

P Eades Heuristic for graph drawing is go! Now fully working, my implementation takes in coordinates as a chaco file, and outputs the cartesian coordinates to a drawing algorithm, which lays out and displays the graph as expected.

Thanks to my supervisors for helping me understand where I had gone wrong, it turns out I misread the paper. Where it asks to calculate a force, I calculated the force of all vertices on one vertex at one point, then applied the force as one big vector. My new implementation now uses the force between two vertices to move said vertex in one go (simple when you think about it now, something I probably should have realised, but were not all perfect).

There are a few issues that need to be fixed, for example, due to the initial position given to my vertices, some graphs are drawn at an angle (but still retain the aesthetically pleasing layout). Also, it has been made known to me, that my method for avoiding doubled edges will not work if I change the way I store vertices and edges, so this will need to be changed.

I will update after some more tinkering and have some screenshots to show you, in the mean time, cya!

1 comment: