Hello everyone. The purpose of this project is to be able to allow students studying a level physics to have a better understanding of projectile motion. This project uses pygame for the rendering, matplolib for drawing live graphs and tkinter for the GUI. To run this simulation, I suggest creating a folder on your machine, downloading all the contents on this main branch to that folder. I have also added a virtual environment, This contains all the external packages that you need to run this simulation that are not part of the standard python library so luckily you do not have to worry about installing them.
To start with this simulation, Start off with running the file called "officialSimulation.py" file. Once you do, a window will pop up. Below is the instruction manual:
to see ball being launched:
- click on "open control panel"
- set the angle of projection and mangnitude of velocity at launch using the sliders
- click on submit all information
- If u decide to change your mind about the angle of projection or velocity or both, re adjust the slider(s) to the desired values of your choice
- make sure to click on "submit all information" again
- next, you have the option to turn on air resistance, if you don't want to, jump straight to step 12, if u want to jump to step 7
- click on "turn on air resistance".
- Then a slider will appear next to this button and a submit button next to the slider
- Move the slider to the right and left. On the scale represented by this slider, 0 corresponds to no air resistance and 10 corresponds to the maximum air resistance this simulation can offer. Then click submit.
- If you decide to change your mind about how much air resistance you want, adjust the slider again and make sure to click on "submit" again
- if u want no air resistance, click on "turn off air resistance". Alternatively, u can re-adjust the slider again to 0, but again make sure to click on "submit"
- Click on launch.
- A pygame window will appear, the white arrow represents that vertical component of the balls velocity
- The green arrow represents the horizontal component of the balls velocity
- The red arrow represents the overall, resultant velocity of the ball
- The purple arrow represent the overall acceleration of the ball.
- press the "esc" key or the X in the top right corner to close the pygame window
too see graphs of motion: 18. repeat steps 1-11 19. click on display "graph of projectile motion" 20. 2 graphs will appear one after the other, one: vertical displacement vs time, vertical velocity vs time 21. click on the Xs on the top right corner of each window to close them
-
click on close control panel or alternatively repeat steps 1-17 or 18-21 to see the ball being launched in projectile motion or too see the graphs of motions
-
once u r back on the home page, click the second button to see the angle that will give u the maximum range
-
U will see a slider, use it to set to the velocity at launch, again press submit
-
if u change your mind about velocity, repeat step 24
-
click on "show graph of range vs angle of projection" which shows u the range achieved when u vary the angle of projection for the given velocity
-
repeat steps 23-26 by changing the velocity at projection, u will notice something special about the angle at which maximum range is achieved.