mattrasto / phase

Network visualization framework for complex systems and simulations
MIT License
9 stars 1 forks source link

Add layout transformations #20

Open mattrasto opened 6 years ago

mattrasto commented 6 years ago

Graph visualizations can get complex, so we should allow the user to use many of the graph layout algorithms to reformat the graph at any point in time. A few examples are:

1. Community Clustering

Group nodes by attribute values/functions and separate the communities into the corners of the visualization. If nodes overlap between groups, they can be set to free-float between communities by default or obey a custom behavior. This can be achieved by specifying gravity wells at the corners of the visualization that nodes in that community are attracted to.

2. Circular Layout

Nodes are arranged in a circle. This can be achieved by fixing all nodes in place and

3. Distance Hierarchy

A node is chosen as the "center" and placed at the center of the visualization. Nodes are arranged in rings around it based on their distance from that node.

Eventually, the user could specify custom layouts. I'm not sure how this would be achieved currently.

mattrasto commented 6 years ago

Layout transformations can be accomplished using constraint-based forces as shown here: https://gist.github.com/emeeks/302096884d5fbc1817062492605b50dd

Ac2zoom commented 5 years ago

Set gravity using some method, (see civic analytics), create demos

Ac2zoom commented 5 years ago

Maybe create a separate library for graph algos