Running the Demo Simulations

Once your BREVE_CLASS_PATH environment variable is configured, you can get started by running breve with one of the included simulation files. Assuming that you are in the breve distribution directory, you can try out the "ArrowSwarm" demo by typing:

# Linux
        % ./bin/breve.sh ./demos/Swarm/ArrowSwarm.tz

# OSX
        % ./bin/breve ./demos/Swarm/ArrowSwarm.tz

# Windows
        > bin\breve.exe demos\Swarm\ArrowSwarm.tz

This command will open a graphical display window containing the simulation, which is initially paused. To unpause the simulation, hit the space bar. When the simulation is running, the following controls can be useful:

  • Space bar: pause/unpause the simulation

  • F1: run simulation forward one iteration step

  • Left mouse: rotate simulation and select objects (described below)

  • Right mouse click: display the simulation menu (described below)

  • Right mouse click (when an object is selected): display a contextual menu for the object (described below)

  • Control (or F2) + left mouse: zoom in and out of the simulation

  • Alt (or F3) + left mouse: move the camera

  • Shift (or F4) + left mouse: select and drag objects in the simulation

  • Escape: to quit the simulation, or access the breve command prompt

The keys F2, F3 and F4 can be used instead of control, alt and shift, respectively, to allow for easier use on platforms which emulate middle and right mouse buttons using the control, alt or shift keys.

The breve command prompt (which can be accessed using the escape key) can be used to execute commands in running simulations. "steve" commands are typed in at this prompt, and will be executed in the simulation's controller object. The steve language (and the controller object) are described in the next chapter ([link]).