Skip to content

This Python application provides a user-friendly menu to select and run four different physics simulations: Spring, Pendulum, Double Pendulum, and 2D Waves.

License

Notifications You must be signed in to change notification settings

gragi-1/Physics_Simulations_in_Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧪 Physics Simulations App

Welcome to the interactive physics simulations app! 🚀

This project lets you explore and visualize four classic physical systems in a fun and graphical way:

  1. Spring Simulation 🪀
  2. Pendulum Simulation 🕰️
  3. Double Pendulum 🌀
  4. 2D Waves 🌊

🚦 Getting Started

1. Install the dependencies

Make sure you have Python 3.8+ installed. Then, install the required libraries:

pip install pygame pygame_gui numpy

2. Run the main app

python main.py

A window will open with a menu to choose the simulation you want to try. Just click the corresponding button and enjoy! 😃


🕹️ Controls & Features for Each Simulation

🪀 Spring

  • Adjust mass, spring constant, and gravity with sliders.
  • Buttons to start/stop and reset.

🕰️ Pendulum

  • Control the mass with a slider.
  • Buttons to start/stop and reset.

🌀 Double Pendulum

  • Control the mass of the second pendulum with a slider.
  • Buttons to start/stop and reset.
  • Watch chaotic trajectories!

🌊 2D Waves

  • Click to create disturbances on the surface.
  • Press Space to pause/resume.
  • Press R to reset the simulation.

📦 Project Structure

main.py              # Main menu
spring.py            # Spring simulation
pendulum.py          # Pendulum simulation
wave_simulate.py     # 2D waves simulation
double_pendulum.py   # Double pendulum simulation

📝 License

Distributed under the MIT License. Use it, modify it, and share it! 🤝

About

This Python application provides a user-friendly menu to select and run four different physics simulations: Spring, Pendulum, Double Pendulum, and 2D Waves.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages