https://github.com/louis-finegan/basic-projectile-simulation-pygame-python3
Simple interactive projectile simulator using PyGame in Python3.
https://github.com/louis-finegan/basic-projectile-simulation-pygame-python3
collisions euler-integration projectile-motion-simulation pygame python3
Last synced: 5 months ago
JSON representation
Simple interactive projectile simulator using PyGame in Python3.
- Host: GitHub
- URL: https://github.com/louis-finegan/basic-projectile-simulation-pygame-python3
- Owner: Louis-Finegan
- License: mit
- Created: 2023-03-01T15:02:38.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-02-01T21:51:55.000Z (over 1 year ago)
- Last Synced: 2025-10-09T08:37:46.424Z (9 months ago)
- Topics: collisions, euler-integration, projectile-motion-simulation, pygame, python3
- Language: Python
- Homepage: https://github.com/Louis-Finegan/Basic-Projectile-Simulation-PyGame-Python3
- Size: 66.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Basic Projectile Pygame Simulator Python3.
## Libaries used:
1. `pygame`
2. `math`
3. `time`
4. `os`
## How to use:
1. Click on one of the grey rectangles and begin typing in the initial conditions. Use the `UP_ARROW` and `DOWN_ARROW` keys to switch between the rectangles. Text boxes will appear as light-grey when selected. Enter the following initial conditions:
- Initial x-velocity in the top most text box.
- Initial y-velocity in the middle text box.
- Launch angle in the bottom most text box.
A recommended initial condition would be `x-vel = 4.5`, `y-vel = 16` and `angle = 45`.
2. Press Enter to start Simulation.
Simulation would rom for `60 seconds`, then after the program will close.
* To quit the program click the x in the top right corner, or press `q` at anytime while the program is running.
* To reset the program when running press `r` at anytime the program is running.
* To delete inputs from the text boxes before pressing enter, select the text box and use the `BACK_SPACE` key.