Band Controllers Update

From[Bill Williams 11 May 2004

  [From Bill Powers (2004.06.11.1132 MDT)]

I've compiled and run band 1, and band 2. I haven't really studied the code.

But, there is something that puzzles me. In both versions when I increase the size of formation and then exercise the disturbance something unexpected happens. The distrubance switched on the disturbed agent moves to the right. Switch the disturbance off the agent moves to the left and when doing so moves outside the chalkmarks that provide a reference for the formation. The strange thing is that the display retains this excursion. However, when I look at the code the screen is updated using a clearwindow or something command that I would think would blank the entire screen.

Bill Williams

[From Bill Powers (2004.06.11.1437 MDT)]

But, there is something that puzzles me. In both versions when I increase
the size of formation and then exercise the disturbance something
unexpected happens. The distrubance switched on the disturbed agent moves
to the right. Switch the disturbance off the agent moves to the left and
when doing so moves outside the chalkmarks that provide a reference for
the formation. The strange thing is that the display retains this
excursion. However, when I look at the code the screen is updated using a
clearwindow or something command that I would think would blank the entire
screen.

I'm using the "setviewport" command in order to shorten the time it takes
to clear the display before rewriting, and to provide a place where the
"disturbance on/off" legend can stay without being erased. The
"clearviewport" command works only within the boundary set by the previous
setviewport procedure. The default is the whole screen, but I'm using an
area only slightly greater than the maximum dimensions of the display. When
writing in a viewport, the coordinates are relative to the upper left
corner of the viewport, not the whole screen.

The disturbance is very large, so you might want to reduce it (it's set in
the "loop" procedure). Also, you can set the "false" argument to "true" in
the setviewport statement, to cause clipping to occur; then nothing will be
written outside the boundaries of the active viewport. Or, of course, you
can use the default full-screen viewport and just remember whether you've
turned the disturbance on or off -- not hard.

Bill P.