<HTML><HEAD>
<TITLE> Documentation for AniS applet </TITLE>
<BODY>
<p><center><h1>Documentation for AniS - the AnimationS
applet</h1>August 3, 1999</center>
<p>

<p> To run the applet, you need an <i>applet tag</i>.  The
skeleton for this is:
<xmp>
<HTML>
<HEAD>
<TITLE> Example of the AniS applet </TITLE>
</HEAD>
<BODY>
<P>
<APPLET code="AniS.class" width=640 height=540>
<PARAM name="parametername" value="value(s) for parameter">
</APPLET>
</BODY>
</HTML>
</xmp>
The rest of this document describes the PARAMeter names and values
needed to drive the AniS applet.  We begin with the controls and
then describe the specification of the filenames of the images.

<p>
One word about blanks (spaces).  Within each PARAMeter clause,
leading and training blanks are ignored for each parameter. You
should use spaces to provide for easier readability.
<p>
<b>Parameters for controls</b> (if the control is named, it will
appear; otherwise, its default value will be used):

<xmp>
<PARAM name="controls" value="startstop, looprock, step, speed, refresh, toggle, zoom, fader, overlay">
</xmp>

<ul>

<li>   <b>startstop</b> is a button for starting and stopping the looping.
If it is not specified, the loop will run forever.  You may use the "rate"
parameter to set the initial looping speed.

<li>   <b>looprock</b> is a button that is used to control whether a movie
loop or a rock  back-and-forth mode is used.  The default is loop, but may be
specified as rocking using the "rocking" parameter.  

<li>   <b>step</b> creates two little buttons useful for single stepping,
forward and backward.

<li>   <b>speed</b> is a slider that determines the animation rate.  If not
used, a default rate of 3 frames per second is used
(unless overridden by the 'rate' parameter).

<li> <b>refresh</b> is a button that will attempt to force a
reload of the image files, ignoring any cached images.  This is
useful for realtime data applications, where the contents of the
image files may be changing. <b>NOTE: </b> <i>If you are using the
"file_of_filenames" method of naming the image files, it is 
<u>very important</u>
not to change the total number of images if you change the
contents of the "file_of_filenames".</i>

<li>  <b>toggle</b> provides a way for the user to toggle images
on and off.  If you specify this control, a series of little
colored boxed will be displayed on a separate line.  As each
frame is looped through, the box corresponding to the image will
change color.  If the user clicks on a box, she will disable it
(clicking again will re-enable it).

<li>  <b>zoom</b> will provide a pixel-duplication zooming ability. When the
'zoom' button is clicked, the cursor will change shape.  When the
user clicks that on the image, it will be zoomed one factor (x2,
x3, x4...) at the cursor location.  After the first zoom, the
button will be relabelled "un-zoom".  Each clicking of "un-zoom"
will back out one zoom level.

<li>  <b>fader</b> will provide a slider for setting the "fade" level. 
You should
NOT use this in combination with any of the first 4 controls
(which allow for animating faded images when the "fade" parameter
is set to 'true' and the 'fader' control is not specified).

<li>   <b>overlay</b> provides one or more checkboxes that allows for
images to be overlaid on the base image.
Each box will be labelled according to the
'overlay_labels' parameter.


</ul>

<b>Other parameters </b>that may be used:

<xmp>
<PARAM name="rate" value="frames/second">
</xmp>
   <i>specifies the initial loop rate as a number corresponding
   to frames per second times 10 (thus, 120 means 12 frames per
   second).</i>

<xmp>
<PARAM name="rocking" value="true">
</xmp>
   <i>make "rocking" the startup mode for displaying the sequence;
   otherwise, "movie loop" is the startup mode.</i>

<xmp>
<PARAM name="pause" value="2000">
</xmp>
   <i>pause on the last frame of a loop the additional number of
   milliseconds given (2 seconds in this example).  The default
   is zero. </i>

<xmp>
<PARAM name="pause_percent" value="250">
</xmp>
   <i>pause on the last frame of a loop the additional percentage
   of the current dwell time specified (250% in this example).  In
   addition, if the current dwell is > 1 second, a fixed value of
   100% will be used whenever this pause_percent option is specified.
   The default value is zero. </i>

<xmp>
<PARAM name="transparency" value="#FFFFFF">
</xmp>
   <i>use the color "white" as the transparency value.  This is only
   needed for overlays, and is optional for fading.  The value is
   a hex value of red/green/blue (template: #rrggbb).  "black"
   (#000000) is also commonly used.</i>

<xmp>
<PARAM name="fade" value="true">
</xmp>
  <i>instead of just showing the images, generate 'faded' images
between them and use the result as the sequence. </i>

<hr>

<p>
<b> Image file names</b>
<br>
All the image files can be in GIF or JPEG formats.  The files
identified using the parameter names described in this section
should fill the desired window.  If used, <i>overlays and
portals</i> should be the same size and have the same geometry
as these "background" images.
<p>
For the background images, the GIF/JPEG files may be specified 
in <u>one of three, mutually exclusive</u>, ways.

<ol>
<li> Using a "root" name, to which successive numbers are appended
to create the actual filenames:<br>
<xmp>
   <PARAM name="basename" value="file">
   <PARAM name="num_frames" value="4">
</xmp>
In this case, the root name is <i>file</i> and since there are 4
images specified, the actual filenames must be: <i> file0,
file1, file2, and file3</i> <p>
<p>

<li> Using the filenames themselvels:<br>
<xmp>
   <PARAM name="filenames" value="file0, file1, file2, file3">
</xmp>

<li>Using a file which contains a list of the image filenames 
(one per record)<br>
<xmp>
   <PARAM name="file_of_filenames" value="file-containing-filenames">
</xmp>

   where the file "file-containing-filenames" contains lines of text
   that are in the form:<br>

<xmp>
   file0
   file1
   file2
   file3
</xmp>

   lines beginning with # are ignored, so you may put comments
   into your file_of_filenames.

</ol>

<b>NOTE:</b> For the first form (specifying a "basename"), you may also use 
a <i>wildcard</i> format.  For example, if you say:
<xmp>
   <PARAM name="basename" value="file*.gif">
</xmp>
the actual filenames must be: <i> file0.gif,
file1.gif, file2.gif, and file3.gif</i> <p>
<p>
<hr>
<b> Portals</b>
<br>
Portals are viewports into other images, which are shown in
windows superimposed
onto the background image.  The user "roams" around in a portal by
dragging the mouse pointer around on the background image.  For each
portal, you must specify its location and size, and then the
filename(s).  If you are animating the background images, you'll need
to specify a corresponding number of portal filenames for each frame
of the animation.

<p>
First, however, the parameter for specifying the location:

<xmp>
   <PARAM name="portal_location" value="x & y & width & height, x2 & y2 & width2 & height2, ...">
</xmp>
Each list item separated by a comma defines the location (x,y)
of the upper left corner of the portal and the portal's width
and height values.  All values are given in pixels; the upper
left corner is (0,0).

<p>You may have any number of portal windows
that you like, but they should all fit inside the dimensions of
the <i>background image</i> and should not overlap.
<p>

To specify the portal image filenames, you may use one of the
following forms (note in each example, 3 portals are being defined
with the names associated with each separated by a comma; in the
second method, the files for each of 4 frames are explicitly named
separated by &).

<ol>
<li> In the first case, you are specifying a "basename" for each
portal (see file name conventions, above).  Each name you specify
is for an individual portal, and the software will load as many
images for each portal as there are background image frames.
<xmp>
   <PARAM name="portal_basenames" value="pfileA, pfileB, pfileC">
</xmp>
(You may also use the <i>wildcard</i> format mentioned above.)

<li> In the second case, you are naming each file explicitly.  The
grouping of names is the same as above -- commas separate
portals.  Ampersands separate filenames for each frame of a loop.

<xmp>
   <PARAM name="portal_filenames" value="pfileA0 & pfileA1 & pfileA2 & pfileA3, 
	  pfileB0 & pfileB1 & pfileC2 & pfileD3, 
	       pfileC0 & pfileC1 & pfileC2 & pfileC3">
</xmp>

<li> Finally, you may also use a text file (the "file-containing-filenames"
form) to specify all the filenames.  To use portals with this form, 
the filenames for all the portals for one frame appear on one line.
<xmp>
      file0 portal=pfileA0, pfileB0, pfileC0
      file1 portal=pfileA1, pfileB1, pfileC1
      file2 portal=pfileA2, pfileB2, pfileC2
      file3 portal=pfileA3,pfileB3, pfileC3
</xmp>

    NOTE: You MUST supply all portals names for each frame, even
    if the filename is repeated!!

</ol>
<p>

<hr>

<b>Overlays</b> 
<br>
You may also use overlays -- one or more images that are (optionally)
displayed on top of the base image, usually in such a
way that part of the base image shows through.  For example, a 
map or plotted data may be an overlay.  In order to let some of the
base (background) image show through, you must designate one color level in
the overlay images as "transparent" and then specify that value using
the <i>transparency</i> parameter (above).
<p>

In addition, you need to specify the <i>overlay</i> control, and
provide a few more parameters:

<xmp>
   <PARAM name="overlay_labels" value="label1, label2, label3...">
</xmp>

This speifies the labels that will be used on the controls for each
overlay.  The ordering of the values should be the same as the
filenames (below).  You'll want to keep these labels brief!
<p>
To specify the names of the files for the overlays, you may use one of
these forms (note in each example, 3 overlays (A,B,c) are being defined
with the names associated with each separated by a comma; in the second
method, the files for each of 4 frames are explicitly named separated
by &).

<ol>
<li> In the first case, you are specifying a "basename" for each
overlay (see file name conventions, above).  Each name you specify
is for an individual overlay, and the software will load as many
images for each overlay as there are background image frames.

<xmp>
   <PARAM name="overlay_basenames" value="ofileA, ofileB, ofileC">
</xmp>
(Again, you may use the <i>wildcard</i> format -- see above.)

<li> In the second case, you are naming each file explicitly.  The
grouping of names is the same as above -- commas separate
portals.  Ampersands separate filenames for each frame of a loop.

<xmp>
   <PARAM name="overlay_filenames" value="ofileA0 & ofileA1 & ofileA2 & ofileA3, 
	  ofileB0 & ofileB1 & ofileB2 & ofileB3, 
	       ofileC0 & ofileC1 & ofileC2 & ofileC3">
</xmp>

<li> Finally, you may also use a text file (the "file-containing-filenames"
form) to specify all the filenames.  To use overlays with this form, 
the filenames for all the overlays for one frame appear on one line.

<xmp>
      file0 overlay=ofileA0, ofileB0, ofileC0
      file1 overlay=ofileA1, ofileB1, ofileC1
      file2 overlay=ofileA2, ofileB2, ofileC2
      file3 overlay=ofileA3,ofileB3, ofileC3
</xmp>

    NOTE: You MUST supply all overlay file names for each frame, even
    if the filename is repeated!!

</ol>

<p>

</BODY></HTML>
