Hypnotize yourself.
Description of applet parameters:
- ballsize - size of ball in pixels
- xinc - number of pixels to translate ball position per iteration
- ballr - red value of ball (0-255)
- ballg - green value of ball (0-255)
- ballb - blue value of ball (0-255)
- backr - red value of background (0-255)
- backg - green value of background (0-255)
- backb - blue value of background (0-255)
- randomcolors - change the ball to a random color at every timeslize (true |false)
- overlay - overlay previous ball with background color. (true | false)
Right now, I've set overlay to false and randomcolors to true.
The Source
ball2.java
backandforth.java