# Realistic 2-D Collision Simulation

This Java application simulates a realistic collision of spherical objects in a two dimensional space. The calculations for the collision response in this simulator is based on the Newton’s “Conservation of Linear Momentum” theory. This theory said, when a collision occurs in an isolated system, the total momentum of the objects in the system before the collision equals to the total momentum afer the collision”. This theory is used to calculate the velocity of the objects after collision. Certain collisions are called elastic collision, which both momentum and kinetic energy are conserved. In an inelastic collision, the total kinetic energy before and after the collision is not conserved. In a 2-D collision, we also know the fact that only the velocity that is parallel to the collision direction is changed. The velocity that is perpendicular to the collision direction remains unaffected. With these knowledge in mind, we can create a somewhat realsitic simulator that illustrates the collision among spherical objects.

How to run the program:

2. You need to have Java Runtime version 1.3 or above installed on your PC.
3. Double click on the Java archive 2d_collision.jar that you have downloaded.
4. If it fails to run, you need to execute it in Command Prompt / Console. Go to the directory where your download is saved. Type java -jar 2d_collision.jar

Instructions:

1. The bottom panel has several attributes that you can alter to create a collision system that you desire.
2. The Coefficient of Restitution accepts a real number from 0.0 to 1.0. The value determines the elasitcity of the collision in the system. A value of 1.0 will create a perfectly elastic collision among objects, while 0.0 will make the collision in the system totally inelastic.
3. After you had changed the attributes, click on Apply button to reinitialize the simulator with the new settings.
4. Click on Start button to begin the simulation and Stop button to stop it.

This program let you experiment with the following:

• Conservation of Linear Momentum in an isolated system.
• The collision response among spherical objects in a two dimensional space.