The POPBUGS user interface


Introduction

The POPBUGS package is implemented in the Poplog multi-language programming environment It provides a resizable colour display of the current simulation and lets the user interact with the simulation using the mouse. A short video showing a user interacting with the package is available here . Unfortunately, the video doesn't show the position of the mouse pointer so you have to guess what the user is actually doing at each stage!

The video shows the main display with the main control panel below. The object control panel is on the left. Clicking opposite `simulation' in the main control panel opens up a menu of canned simulations. Pressing `Reset' reinitializes the world for the selected simulation. Pressing `Start/Stop' starts or stops the current simulation and pressing `Refresh' refreshes the display.

The main parameters of any object in the world can be manipulated simply by clicking on that object in a particular way. Subsidiary parameters are manipulated via the object control panel.

Objects in the bugworld are selected using the left mouse-button. The first time you select an object a control panel opens up showing the object's attributes. You can modify the attribute values showing in the control panel at any point, even while a simulation is running. Some attributes have a menu which is activated by a single mouse click. Some have a slider. And some are just text fields that you modify by clicking on them and then typing in new text.

To select a new object and make its attributes appear in the control panel, you click on it with the left button. To move an object, you click down over it with the left button and move the mouse to the desired position before releasing the button. If you hold the Shift key down while doing this, mouse movements will have the effect of changing the object's shape and size rather than its location. If you hold the control key down, movements will change the object's direction. Clicking once over an object, without moving the mouse, will have the effect of changing the object's `display level' (see below).

The middle mouse-button is used to create new objects. Clicking it on an empty space in the bugworld creates a new bug. Clicking it on an empty space below the bugworld creates a new obstacle. To place the object, hold the click while you move the mouse pointer to the desired location. To make a copy of an existing object, click the middle mouse-button down over that object and then move the mouse pointer to any location.

If clicked below the bugworld, the right mouse-button refreshes the display. However, you can also use it to take manual control of a bug. Clicking it directly over a bug causes that bug to spin on the spot. Following this, clicking on the left button will turn the bug left, clicking on the right will turn it right and clicking on the middle button will move it straight ahead. To get the buttons back to normal just click below the bugworld with the right button.

If you take control of a bug in a simulation involving several bugs, the other bugs will do one `move' for each button click. This allows you to interact dynamically with a simulation. You can try it with the `pursuit' simulation by selecting `pursuit' from the simulation menu and then clicking the right button on one of the bugs.

Note that clicking the left button inside the bugworld advances the simulation one cycle. Clicking the right button inside the bugworld regresses it one cycle.

Most of the object attributes are fairly self-explanatory. You can normally find out what they do by changing their values. The `position' attribute controls the position of the bug within the bugworld (the coordinates range from 0 to 100 in both dimensions). The `dimensions' attribute controls the size of the object. (Note that you can make the bugworld appear bigger by making all the objects in it smaller.) `shape', `colour', `trail_colour' etc. all work in the obvious way. Most of the other attributes are explained below.

The functions of the mouse buttons are summarised below.

Left button Middle button Right button
--------------------------------------------------
Below | start/stop | create new | refresh |
bugworld | simulation | obstacle | display |
|----------------|-----------------|---------------|
Inside | advance | create new | regress |
bugworld | simulation | bug | simulation |
|----------------|-----------------|---------------|
Over | select/drag/ | make a copy | drive |
object | resize object | of object | bug |
--------------------------------------------------
The POPBUGS package is implemented in .


Page created on: Fri Apr 26 09:34:41 BST 2002
Feedback to Chris Thornton
hits this year