1

I wrote a short directed graph viewer that generates random nodes and random directed relationships between nodes and presents them on screen.

The nodes are currently positioned sequentially as a grid, and as one can notice, there's a lot of line intersections happening:

Graph Viewer example

I would like to reduce line intersections to make the graph look more appealing. There is no need to conform to the grid arrangement.

How do I programmatically reposition the nodes to untangle the graph as much as possible?

MathuSum Mut
  • 2,765
  • 3
  • 27
  • 59

0 Answers0