vasturiano / 3d-force-graph

3D force-directed graph component using ThreeJS/WebGL
https://vasturiano.github.io/3d-force-graph/example/large-graph/
MIT License
4.67k stars 825 forks source link

black holes #641

Open 2arch opened 1 year ago

2arch commented 1 year ago

Can we get a feature where if there are more than N amount of nodes in a given area, you attribute the density of a node depending on how many connections it has, and the higher the density the shorter the link distance - giving the illusion that some regions are more tightly packed with information.

Maybe once you get to a point where your graph is very large - you'll be able to randomly generate blackholes where there are too many connections - if the density of a node is greater than 100

vasturiano commented 1 year ago

@atlllas one could certainly set a linkDistance accessor function that depends on exactly the things you have mentioned.

myGraph.d3Force('link').linkDistance(link => ...)

I don't know what the result would be, or whether it would generate too much instability in the graph, but it would be an interesting experiment nevertheless. 😄