Analog_Clock

Description


	The Analog Clock module is a 3-dimensional, graphical readout that presents a
"stopwatch" or "piechart" dial display.  It is designed to be connected to an
integer parameter whose value is changing over time.  The Analog Clock provides a
qualitative way of seeing the value change.  By setting the cyle length of the
Analog Clock intelligently, the input parameter's change over time can be elucidated.
	For example, if the cycle length is set to 100, and the Max Value is set
to 1000, the fast indicator will cycle for every 100, and the slow indicator will
cycle at one tenth this speed.
	The Analog Clock produces two types of "clock"
Pie Chart - This counter uses a "cheese wheel"-shaped clock as its fast indicator,
and a change in color of the cheese wheel as its slow indicator.  In this version,
the colors wrap around past each multiple of Max Value.  
Analog Clock - This counter uses a standard two-handed analog clock face (without
markings) as its fast and slow indicators.

Inputs

-
Clock Value (Integer) - The current "time" value that the clock is to display
Color (Colormap) - Only used by the pie clock, this colormap describes the colors
that are to be used to shade the pie as time progresses.  The upper and lower
boundaries of the colormap are ignored - the first rotation of the pie is mapped
to the 0th element of the colormap, and the rotation that includes the max
value is mapped to the last element of the colormap.
	If no colormap is supplied the color change is, by default, a linear
change from blue to red.  If chaining is turned on, the color of the pie is
white but can be changed using the Geometry Viewer's Edit Propety option, applied
to the Analog_Clock_pie object.

Outputs

-
Clock (Geometry) - The geometry of the current Analog Clock clock
Chain (Integer) - When chaining is turned on, this output is designed to
be connected to another clock module.  The output value is equal to the 
input time divided by the cycle length.  So, if three clocks are chained,
all with Cycle Length 10, if an input of 253 is sent to the first clock,
the first clock will show 3; the second, 5; and the third, 3.  This mode
can be used to create "electric meter" style displays.

Parameters

-
* Cycle Length (Integer) - The speed of the "minute hand" (hand clock) or
the speed of the "pie slice" (pie clock).  These items cycle a total of 
360 degrees over this amount.  So, if this value is 100, an input of 
50 will place the "minute hand" or "pie slice" at the halfway point around
the circle.
* Max Value (Integer) - The speed of the "hour hand" (hand clock) or  the
speed of the color change (pie clock).  These items change so that they cycle
once over the set value.
So, for example, if Cycle Length is 60, and Max Value is 12*60=720, the Analog Clock 
will act like a standard 12-hour clock, assuming the input parameter is a
counter of minutes.
* # of Polygons (integer) - This is meaningful (and visible) only for
the pie clock, and determines the number of polygons used to
approximate the pie.  The higher this value is, the smoother the clock
will appear, and the slower the module will become (as it must
calculate more polygons).
* Pie Clock (boolean) - If this is on, the display is a pie chart clock.
If it is off, the display is an analog ("handed") clock.
* Chaining (boolean) -  When chaining is on, the chain output is updated
continuously, and the slow hand (hand clock mode) or color change (pie clock
mode) is turned off.  Also, Max Value is made invisible, as it has no meaning
when clocks are chained.

Example network

 No Chaining
(Similar example network is in analog_clock.net)
Animated Integer
     |\____________________
     |                     \
   Analog Clock       (Visualization Network)
     |      _______________/
     |     /
     |    /
Geometry Viewer
Example Network - Chaining
(Similar example network is in analog_clock_chaining.net)
Animated Integer
     |\___________________
     |                    \
     |                     \
   Analog Clock       (Visualization Network)
     |      |               |
     |      |               |
     |      |               |
     |    Analog Clock      |
     |      |               |
     |      |              /
     |      /             /
     |_____/_____________/
     |                         
Geometry Viewer
Version Bug Fixes:
	Version 1.0 - first release.
	Version 2.0 - Added support for colormap control of color values
Known Bugs / Annoyances:
If an instance of the module is hammered (deleted), the Analog Clock still hangs
around in the Geometry Viewer.  To delete it, go into the Geometry Viewer
menu, select the object Analog Clock.# (where # is some number), and delete it.
It will delete all of the clock parts.
The clock assumes that the min value is always 0.  This can be fixed using
the real math modules found at the IAC, shifting an integer parameter that
doesn't start at zero to zero.  However, a later version will allow any
minimum value.