Billiards-Board-Simulation
The following program simulates a billiards table where the ball moves at 45 degree angle with elastic collision. The program also specifies the number of times the ball's path intersects a random line (user specified). The total number of collisions is width + length - 2 where width and length are relatively prime.
Instructions to run the code:
- Click run
- Enter the values of width of the table, length of the table, point1’s x-location, point1’s y-location, point2’s xlocation, point2’ y-location
- The values should be entered with spaces between each other
Packages imported:
- Matplotlib
- Sympy
- Numpy
- Math
Modules Imported:
- Ball