Closed avose closed 1 year ago
In the spirit of (2) above, I made the edge springs weaker up close but grow in strength faster when stretched: dists = (dists*0.25)**3.0. This helps a bit for larger graphs. The constants still need to be connected to the settings.
Not quite physics, but I did connect a font selection for the graph into the settings..
Yeah, I don't know about this, actually. It's tricky to get the forces balanced right. I'm not sure how useful this would really be for users. I should certainly work on this more, but I don't think it makes sense for users to mess with it.
There are some settings in the force-directed placement algorithm. Things like "speed" in the code control the strength of the overall forces. This should be made a setting in the existing settings dialog.
There are also settings for the physics calculation that should be added:
(1) Optional momentum. Currently there is no momentum in the calculation. (2) Spring / edge strength. This is a constant of "0.1" now, but should be a setting. (3) Anti-gravity strength. This is a constant "0.1" now, but should be a setting. (4) I don't know if we need a setting for this, but it might be nice: the edges have a constant spring force, but it would probably be a good idea to make them have a linear zone, but when they stretch really far, it should switch to non-linear force like r^2 or something. There could be a setting for at what length the crossover from linear to non-linear is.