力引导布局

力引导算法主要应用与复杂网络可视化。力引导布局最早由Peter Dades在1984年的“启发式画图算法”文章中提出。目的是减少布局中边的交叉,尽量保持边长一致。主要引入库伦斥力和胡克弹力,考虑阻尼衰减(这就是为什么我们拉动力引导图,它能很快稳定回来的原因)。事先定义好图里的点,边的权重等信息,力引导图可以根据实时状态自动完成很好的聚类,方便地看出点之间的亲疏关系。

作者:神经夜专
链接:https://www.zhihu.com/question/28825558/answer/92200669
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

D3.js官网:http://d3js.org/
D3.js github:https://github.com/d3/d3
力导向图(Force-Directed Graph),是绘图的一种算法。在二维或三维空间里配置节点,节点之间用线连接,称为连线。各连线的长度几乎相等,且尽可能不相交。节点和连线都被施加了力的作用,力是根据节点和连线的相对位置计算的。根据力的作用,来计算节点和连线的运动轨迹,并不断降低它们的能量,最终达到一种能量很低的安定状态。

https://bl.ocks.org/mbostock/4062045

Force-Directed Graph

Open

This simple force-directed graph shows character co-occurence in Les Misérables. A physical simulation of charged particles and springs places related characters in closer proximity, while unrelated characters are farther apart. Layout algorithm inspired by Tim Dwyer and Thomas Jakobsen. Data based on character coappearence in Victor Hugo's Les Misérables, compiled by Donald Knuth.

Compare this display to a force layout with curved links, a force layout with fisheye distortion and a matrix diagram.

http://echarts.baidu.com/examples/editor.html?c=graph-force

你可能感兴趣的:(力引导布局)