Directed Graph Anti-Gravity

Jul 28, 2010 at 5:07 AM

Hi Team, Brilliant work you've done on ICE.

I'm wondering if your consider creating a new "physics" option that makes it better for directed graphs.

Use case

I'd like to select an object & see what depends upon it & what it depends upon. So as I expand fro my root node, the tree should grow up & down.  

Currently ICE is Root centric & gravity causes everything to rise/fall from the root, & then repell from each other.

But I'd like

  1. Nodes that depend on this node to float above it, & those it depends on to fall below. (unless there are so many that they repel each other & need all the screen. You then add a fraction of the weights of all the ancestors / Decendants of the nodes that point to/from this one.
    Thus nodes that only point to other nodes will float & those being pointed to will sink.
  2. Ability to reposition any node & not just root nodes. ie whatever node I explicitly placed last, should remain where I put it & everything else to move in relation to it.

How could it be done?

1. Every node is given a score based on the SUM (the nodes that link TO it) minus the SUM (of the Nodes that it points to).

 Note: Do not do this with recursion as it can take ages & cyclical graphs will kill you. Just have each node keep 2 numbers;
a) The NET weight of its immediate nodes, &

b) a Fraction of the total weight of its Ancestors/Decendants (all those nodes above/below it).

 By using these 2 numbers the calculations of adding nodes should be kept to a minimum. (similar concept to that of an Exponential Moving Average)

I realise this is an approximation & you do need to recalc when you break links but gravity is only one of the metrics that are affecting node placement, it doesn't have to be super precise.

PS: would also be nice if the Default link styles had an option to put an Arrow head

Thanks for all your hard work to get this tool to this stage.