Here are some rather un-remarkable algorithms. For example, bubble sort is
only four lines of C code. The only exciting point here is not the
algorithm, but rather the interface to it, which contains the
scaffolding needed to animate any geometric algorithm.
How to use the interface:
- Choose an algorithm
- Choose an input generator, and a view.
- Click "run" to start the algorithm.
The widgets on the user interface work as follows:
- "Init" button: The algorithm takes data in from the input
generator, is is ready to begin.
- "Run" button: The algorithm starts running. If it had already
started and was paused, it resumes from where you paused it.
- "Pause" button: suspends the algorithm, until you press "Pause"
again.
- "Step" button: Run the algorithm for a while, then pause again.
- "Kill" button: Terminate the algorithm.
- "Algorithm" choice: pick an algorithm.
- "Input" choice: pick the type of input data for the algorithm.
- "View" choice: pick a way to visualize the algorithm's behavior.
- "Events/Step" slider: How many algorithm events elapse when
"Step" is pressed. This is also how many events elapse between
screen updates.
- "Steps/Second" slider: How fast to run the algorithm.
Enjoy! If you have any suggestions, send me e-mail!
Alejo Hausner, CS Department, Princeton University
Last modified: Fri Jul 12 14:28:56 1996