samizdatco / arbor

a graph visualization library using web workers and jQuery
http://arborjs.org
2.66k stars 635 forks source link

is there a way to slow it down #4

Open tingletech opened 13 years ago

tingletech commented 13 years ago

Hi,

I've been playing around with arbor, pretty cool stuff. I don't really understand the physics. Do you know what parameters I should focus on to slow it down? Here is a video of what is going on, the graph just goes crazy.

http://screenr.com/UNv

AlexandreAbreu commented 13 years ago

Do you have sample code/data to reproduce that?

tingletech commented 13 years ago

https://gist.github.com/933535

AlexandreAbreu commented 13 years ago

I forgot to answer that. There is an issue w/ the solver part of the code. You can see that it is a known issue there:

https://github.com/samizdatco/arbor/blob/master/src/physics/physics.js

// BUG: // since things oscillate wildly for hub nodes, should probably normalize spring // forces by the number of incoming edges for each node. naive normalization // doesn't work very well though. what's the `right' way to do it?

Might have a look @ it,