Algorithm
Animation

Disclaimer

This is an old and dusty work. It has proven to be useful for many but it can't be used anymore as a production quality software... The main problem is that nothing has been done to adapt the source to the evolution of OS since 1993 :)

Ani what?

Algorithm animation is a powerful tool to explore a program's behavior. It is used in various areas of computer science, such as teaching, design and analysis of algorithms or performance tuning. Algorithm animation systems provide a form of program visualization that deals with dynamic graphical displays of program's operations. They offer many facilities for users to view and interact with an animated display of an algorithm, by giving various ways to control the data given to algorithms and their execution through multiple views. Zeus and XTango are two well-known systems for doing algorithm animation. However, they both share the same lack of simplicity. The aim of this work was to design and implement a new tool allowing rapid and easy production of algorithm animation. This tool is called agat (Another Graphical Animation Tool)

Agat provides support for watching a program in action, through the use of a stream processor. To animate a program you have to provide some of its output to the server by sending them on some named streams. Streams can then be combined to form more streams. The output of a stream can be linked to the input of a graphical operator to produce a display. Whenever an interesting value is sent on a stream by the program, the value is propagated along all the combined streams, and each stream output updates its visual display appropriately.

A very important feature of agat is the client-server architecture it is based upon: the animation server is a separate process. Only a few lines of code have to be added to the source program in order to animate it and the animation itself is described within an animation file to be loaded in the stream processor. This architecture makes the description of the animation independent from the program to be animated, thus eliminating the need to recompile the program everytime you need to change the animation.

get data from program and feed to various operators
agat can save an animation and replay it at the speed you want. In fact all the values are saved (with their time of arrival to keep a "real time" feeling) so that you can easily try any other animation without having to run your program again.

According to the first experiences we made, algorithm animation with agat is quite simple and powerful enough for most needs.

How to instrument your code and some agat samples

- How to prepare (C or Fortran) programs for animation
- An example of a C algorithm animation: a (not that) random number generator

Samples of graphical outputs

These pictures were built by adding one or two lines to source code and writing a very short description of what must be plotted. Take a look at the documentation to understand how this powerful tool may be adapted to your needs.

Here is a list of examples with the C and Agat code and the result of the execution for different graphical operators:

The first series of examples are very basic. They demonstrate that agat is very simple to use and that you can obtain an interesting animation with only a few changes in your source code.

Histogram operator.
histogram
Plotline operator.
plotline
Box operator.
box
3D plotline operator.
3d

Documentation

- A more complete presentation of AGAT.
- The up to date manual.

Installation

Agat has been tested on various SPARC stations (running SunOS 4.1.x) and on Linux (Kernel Version 1.2.0). It's a bit bugy on Dec Alpha. Feel free to port it to other architectures ;) Sources here agat.tgz

Back to home page oliv@arsac.org