Andreas Rozek Hints for Reading List of Recent Changes Guestbook Entry Contact the Author  Deutsche Version  HomePage Previous Topic Next Topic  First Page of Current Topic Next Page Previous Page

Bouncing Ball

This page refers to an experiment which tests if the "PixelGraphics" package may also be used for "live" (animated) graphics within a HTML document.

While this page may be risklessly displayed with any browser and even on computer systems with only moderate processor and memory capacity, visiting the actual Bouncing Ball page may occupy your computer for several dozens of seconds and - probably - crash browser and/or operating system! (The author recommends Opera 5.12 (or newer) for a good performance!)

If you want to learn more about the underlying JavaScript pixel graphics package, you should also visit the "PixelGraphics" page (following this link is safe).

Please, also consider my "Hints for Reading" and the "List of Recent Changes".

Overview

The figure on the left shows a (static) snapshot of the "Bouncing Ball" demo: within an area of 60x45 pixels, a small ball (represented by a single pixel) moves around randomly (but on a straight line) until it is reflected by any of the borders.

The user may start/stop the animation and "reset" the ball's movement parameters.

If you are aware of the potential problems for your system, you may proceed to the actual demo.

Source Code

The source code of this demonstrator is available for download:

You will also need the "PixelGraphics" package:

Disclaimer

Please, consider also the author's Disclaimer!

http://www.Andreas-Rozek.de/JavaScript/Libraries/BouncingBall/index.html    (last Modification: 09.05.2002)