yadala1998 / Billiards-Board-Simulation

A very simplified billiards board simulation in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

  1. Click run
  2. 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
  3. The values should be entered with spaces between each other

Packages imported:

  1. Matplotlib
  2. Sympy
  3. Numpy
  4. Math

Modules Imported:

  1. Ball

About

A very simplified billiards board simulation in Python

License:MIT License


Languages

Language:Python 100.0%