This directory contains an example of the Necker cube phenomonen, using
the Graphics Interface.  To run this example you will need to be on a SUN
workstation.  Make the simulator by typing `make'.  This will produce an
executable `sim'.  Run this executable.  Once the graphics window is built,
move the mouse cursor to the command sub-window of the graphics tool, and
type `read demo'.  After some confusion you will see a cube, beneath a 
square, beneath two icons.  At each vertex of the cube and the square will
be a black icon.  Also on of the topmost icons will be a black square.  This
represents one interpretation of the necker cube.  The icons (units) around
the cube represent the orientation of each vertex (into or out of the screen).
The icons (units) around the square represent the direction of four of the
lines in the cube, as labelled.  The topmost icons represent the final
interpretation (B or H closer to you).  For each of the black squares
representing one interpretation there is a white square (four little dots
when inhibited) representing the other interpretation.

To see the network run, click in the mode panel on CUSTOM.  You will see
the commands associated with the mouse buttons appear in the right hand
panel.  Move the mouse cursor into the graphics window (where the cube, etc
are) and click the left and middle buttons in that order.  This resets the
network to the start state.  Then click the GO button in the lower part of
the right panel once.  Some activity will appear in the graphics panel.
Click again a few times and you will see one of the interpretations winning.
After about 10 steps it will usually have settled on an interpretation, but
it can take more.  You can then move to the graphics window, click the left
and middle mouse buttons again, and run the simulation once more.  This may
be repeated as many times as you like.  On average, each interpretation should
come up as often as the other.

The network is operating in asynchronous mode.  Try it in synchronous mode
by moving to the command prompt sub-window and typing `sync'.  Then run
the network again.  You will see some kind of deadlock or oscillation.
Try the fair asynchronous mode by typing `fsync 10 100' to the command
prompt.  This means 10% of the units will go at each step, so move to the
`number of steps' control on the right panel, and set it to 10.  Then try
clicking the GO button again.  To quit, click on the QUIT button in the
right panel.

You can expand the graphics window to give a slightly better view of what
is going on with the usual SunTools mouse actions at the header line of
the graphics tool.  You can move the network display around in the
graphics sub-window with the middle mouse button (but not in CUSTOM mode).
