Running Rainbow Applet Test

Running Rainbow Applet

You should see an applet here if your browser supports Java.

by Oleg Baranovsky

This is a simple applet to generate animated rainbow horisontal bars like those you can see above.

It generates the rainbow image to animate on fly rather then to download it from server and currently supports two methods of image generation.

There are also animation parameters supported. They are:

The overall description of class is following:

Class name: RunningRainbow.class;
Class type: Applet;
Example of implementation:
<applet code=RunningRainbow.class width=100% height=2>
<param name="delay" value="100">
<param name="shift" value="2">
<param name="direction" value="left">
<param name="method" value="gaussian">
<param name="sb" value="0.2">
<param name="sg" value=".3">
<param name="sr" value=".5">
<param name="ar" value="0.5">
<param name="ag" value="0.5">
<param name="ab" value="0.5">
You should see an applet here if your browser supports Java. </applet>

Parameters:
ParameterTypeDescriptionPossible ValuesDefault ValueComments
delayIntegerdelay of animation10 - 1000100 
shiftIntegershift of animation0 - ...2 
directionStringdirection of animation["left" | "right"]"left" 
methodIntegermethod of rainbow rendering["gaussian" | "trapezoid"]"trapezoid" 
arDoublemean value of red component[0 - 1]0.0"gaussian" method only
agDoublemean value of green component[0 - 1]0.5"gaussian" method only
abDoublemean value of blue component[0 - 1]1.0"gaussian" method only
srDoubledispersion of red component[0 - 1]0.5"gaussian" method only
sgDoubledispersion of green component[0 - 1]0.5"gaussian" method only
sbDoubledispersion of blue component[0 - 1]0.5"gaussian" method only


The source,     Get the whole package,     See another test,     Return to my Homepage.