pt
pt copied to clipboard
Add force-directed graph
Let's get this party started 🎊
- I've added a very simple demo.
- I've changed the
demo/index.html
file and thegulpfile.js
to make this easier to review. Just rungulp extend
and check out the demo to get started 😄 .
Problems:
- In the
ForceDirectedGraph
file, I have multiple classes implemented.- Ideally:
- We'd like
Graph
to maybe extendPointSet
- We'd like
Edge
to maybe extendPair
- We'd like
- Ideally:
- No live (force) simulation. I am unsure how to approach this. I initially thought just moving a vertex and running the algorithm again would be an option, but it gets super jittery.
- The current
Edge
implementation is bad and looks like that because I wanted it to be compatible withForm.lines
.
Let me know your thoughts. Please take a look at this when you have time and sorry for not splitting it into multiple commits 💦 ..
Exciting! Will review soon, thanks :)
Sorry for keeping this PR stale 🙏 I've been thinking about the implementation and I think I need to revisit this algorithm. Fruchterman & Reingold (current implementation) runs on O(n^2) and is horribly slow.
I lost my (half-working) implementation of this 😭 http://www.wisdom.weizmann.ac.il/~harel/papers/highdimensionalGD.pdf
I've also looked into FADE (that builds on the Barnes-Hut simulation): http://crpit.com/confpapers/CRPITV9Pulo.pdf
I am not sure what I should do at the moment. Maybe try and take a stab at FADE? What do you think?
@tofuness Wow these papers are intense. I would suggest you pick an implementation since you probably know way more about this than I do.
I appreciate your contribution, even if it's O(n^2). It's a start!