Use graphics.py.
It is a simple graphics library.
Click HERE
for more information.
(download, install, documentation, ...)
Create a simple animation/simulation of a ball bouncing off of walls.
Note: Gravity is approximately 9.8 meters per second squared (m/s2) or 32 feet per second squared (ft/s2) at the Earth's surface.
To simplify the calculations, assume the ball is infinitely small and has no radius. After this design/code is working, can you take into account the ball's radius?
Let the user define up to 8 straight walls of various sizes and orientations. The walls define a closed space with no openings. Simulate A bouncing ball.
Drop the ball onto the floor from a given height (with no air resistance). Animate/simulate a bouncing ball in earth's gravity. Assume it losses of 2% of its speed with each bounce.
Let the user
What about
Coding a Physics Engine from scratch! (YouTube)
The following are the g-force (gravity) you would experience on another planet if you were standing on the surface or, in the case of the ice giants, floating in the atmosphere.
| Planet | Fraction of Earth's g-force |
|---|---|
| Mercury | 0.38 g |
| Venus | 0.9 g |
| Earth | 1 g |
| Moon | 0.17 g |
| Mars | 0.38 g |
| Jupiter | 2.53 g |
| Saturn | 1.07 g |
| Uranus | 0.89 g |
| Neptune | 1.14 g |