A simple implementation of a two dimensional collision simulator using
javax.swing. The location you click will be where a ball is spawned, the distance you drag it will determine the magnitude of its velocity, the direction you drag it will determine the direction, and finally the length of time you hold it will determine its size/mass.
You can adjust the coefficient of resistitution, frames per second, the acceleration of gravity, and the path size.
The physics equations used afre those you would typically find in a twelfth grade physics class.
Finally, balls can be created within other balls and the program will adjust so that there is no overlap.