Assignment 2 - A graph editor
This project started out as an attempt to make a particle system affected by interesting-looking physics which "balanced" a graph automatically. I settled on a compromise where it is more of a graph editor with mathematical relationships which help slightly balance the graph but don't actually model any real physics.
Nodes that are near each other are pushed apart. Nodes that are far apart and connected by an edge are pulled together.
- Keyboard: (primarily "extra" in terms of using the program)
- Escape - exits
- 1 - sets the edge length to the default
- 2 and 3 - changes the edge length
- 0 - sets the "force" strength to the default
- - and + - changes the "force" strength
- Right click to get a pop-up menu
- Left click on the menu to do the following:
- The yellow rectangle switches to the "node" tool. When it is selected, clicking in the drawing area creates a new node.
- The green line switches to the edge tool. Press down near one node and release near another to draw an edge. A temporary line is drawn to show you where it will be placed.
- The red X removes all of the edges and nodes.
- The play button pauses and unpauses the animation.
- Drag nodes with the middle mouse button to move them
- The node nearest the cursor is the "selected" node. It is blue.
- assignment2.cpp - The one and only source file
- globj - The executable
- globj.png - A screenshot of a person
- Makefile - A very simple, strict, yet sadly not very portable makefile
- README - This
- graph.txt - An example graph which can be loaded with the right mouse button's menu
Compiled in Linux with:
- thumbnail.png (9.0 KB ) - added by 18 years ago.
- springygraph.tar.gz (26.2 KB ) - added by 18 years ago.
- assignment2.exe (499.3 KB ) - added by 18 years ago.
- SpringyGraph.dmg (36.3 KB ) - added by 13 years ago.
- springygraph-win32-bin.zip (156.7 KB ) - added by 13 years ago.
- springygraph-src.tar.bz2 (13.8 KB ) - added by 13 years ago.
Download all attachments as: .zip