Force Based Graph
Made in Scala.js, while Webix is used for the GUI.
The repository is on github,
inspiration from here.
The eventual result is JavaScript-code, running in any browser.
In this respect you could see it as an alternative for the Java-applet, banned by
Oracle for security reasons. You can't however, in contrast to a normal Scala application, mix Scala with Java-code.
Short instructions:
- "Volgende" (next): (randomly chosen) graph.
One of those itself is randomly generated, with the chosen number of "knopen" (vertices).
"Connecties" (connections, edges) (with the chosen number as maximum count), are randomly chosen in the process.
- There is a "sleep/wijzig" (drag/change) toggle-button:
In "sleep" (drag) mode you can drag the graph by the vertices.
In "wijzig"(change) mode you can cut the edges (when separated the vertices might disappear because they are repulsive).
You can connect vertices, or create new ones (drag from a vertex into the void).
- The "zoomfactor" (-5 to 5) zooms by a factor of 1.5 in every step.
- "Knoopkleur" (vertexcolor) determines the color of new vertices.
Just a surprising little fact:
- The "sputnik" (one of the graphs) turns out to have two different stable forms: one with the yellow vertex in the centre,
and far less probable and stable, with the yellow vertex as top.
If you yourself generate configurations, you'll discover more of this kind of instabilities.
(It's a pity you can't save the structures. Ideas anyone?)