Use the settings below to customize the graph on the left. When you are ready, click "Update" at the bottom to see your new randomly generated graph!
You can click and drag any of the points on screen and watch how all the others react.
What you are seeing is a randomly generated graph that is reacting to three (possibly four) forces.
The first force is a general repulsive force between all dots, connected or not. This works like an electrostatic force and grows weaker the farther any point dots are from eachother. The second force opposes this: an attractive spring force between all connected dots. This graph will eventually "settle" when these two forces cancel out, which occurs when dots are as close to the spring length as possible, or in the lowest state of energy.
The last force is a "gravitational" force, which in this case is simply a spring force from all particles to the center of the screen. This keeps everything from floating away into oblivion. Optionally, you can add a similar force to your mouse position so that the dots are attracted to it.Isn't physics incredible??