https://github.com/kahngjoonkoh/physics_simulator
Simulates graviational forces, circular motion, and momentum conservation.
https://github.com/kahngjoonkoh/physics_simulator
pygame simulator
Last synced: 23 days ago
JSON representation
Simulates graviational forces, circular motion, and momentum conservation.
- Host: GitHub
- URL: https://github.com/kahngjoonkoh/physics_simulator
- Owner: kahngjoonkoh
- License: mit
- Created: 2022-10-30T09:57:30.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-01T19:31:39.000Z (over 3 years ago)
- Last Synced: 2025-03-05T12:20:41.253Z (over 1 year ago)
- Topics: pygame, simulator
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Physics_Simulator
Simulates graviational forces, circular motion, and momentum conservation.
Individual values can be tweaked in the settings for preference.
Drag and let go of the mouse to create a sprite. The default value is 100 for the mass. (no units) Red line indicates the direction of motion and the initial velocity.
The created sprite is of random color and leaves a trail. (they disappear after a while, you can change it in the settings)
Can scroll the mouse wheel to increase or decrease volume.

While creating a sprite, if you type in a number, the created sprite will have such mass.

There is gravitational forces acting between sprites.

If they collide, there is momentum conservation.
Only the surviving sprite's trail is kept.
By creating a sprite while clicking "C" key, you can create a constant sprite. This means, the sprite will not move.

By creating a sprite and 'linking' it to a sprite, you can create circular motion.

You can create interesting motion such as

Pressing the "spacebar" will pause the motion of the sprites.
"R" will randomly generate a situation.

"Q" will clear the screen.
Use the conventional "ASWD" keys to navigate. This feature is under development and is prone to errors at the moment.