Please use a Java-enabled browser.

Downloads: jar library | source code


With this Java applet, you can fire one ball at a stationary ball and watch the collision simultaneously in the lab frame and center of mass frame. There are simple controls to change the angle of the collision and ratio of masses.

Author: Drew Dolgert
Owner and contact: Michael Fowler -
Date: 22 September 1998
Version: 1.0
Distribution: Gnu Public License, How to link to the applet
Language: Java 1.1


international - "yes" or "no", defaults to yes.
Set this to no in order to disable ResourceBundles.


language - the two-letter language code
EN for English, FR for French, etc. This is the first specifier of a Locale. While some languages like Russian aren't official Default Locales, we can certainly add them if someone supplies an appropriate properties file. If you do not specify a language, the applet should use the default language specified by your browser's Java Virtual Machine.


country - the two-letter country code
ZH for China, IT for Italy. This further specifies a locale if, for instance, you want to differentiate French in France, "fr", from French in Canada, "fr_CA".


threadsleep - integer, defaults to 40
The number of milliseconds the Collision thread should pause after it shows the next frame of a shot. Set higher for smooth animation on slow machines, lower for even smoother animation on fast machines.


timestep - integer, defaults to 20
The number of timesteps for Mass 1 to strike Mass 2. If you make the threadsleep smaller, you might want to make the timestep larger.


trails - "lines" or "dots", defaults to "dots"
I couldn't decide whether I liked lines or dots for the trails, so I made it a parameter. Dots show you how fast the ball moved, but lines give you a better sense of the angles. I'm pro-dots now.

Submitted by : Email:

© 2010 Java Science       Go to the main pageNext