This project is a Python application that simulates a pendulum placed in a bare land, being moved by wind. The simulation is implemented using OpenGL, allowing for real-time 3D rendering of the pendulum's movement. The simulation also includes sound effects to enhance the user experience and offers multiple camera positions for different perspectives.
- Real-time simulation of a pendulum's movement in a bare land.
- Wind effect that affects the pendulum's motion, creating a dynamic and interactive environment.
- Sound effects to provide audio feedback and enhance the realism of the simulation.
- Multiple camera positions to view the pendulum's motion from different angles and perspectives.
To run the Python OpenGL Pendulum Simulation on your machine, follow these steps:
-
Prerequisites:
-
Python 3.x installed on your machine.
-
Required Python packages installed. You can install them using
pip
:pip install PyOpenGL PyOpenGL_accelerate pygame
-
-
Clone the repository:
git clone https://github.com/se348/Pendulum_model.git
-
Navigate to the project directory:
cd Pendulum_model
-
Run the simulation:
python3 main.py
-
Interact with the simulation:
- Adjust the wind intensity to see how it affects the pendulum's movement.
- Experiment with different camera positions to view the simulation from various angles.
The simulation provides the following controls:
- Mouse: Click and drag to change the camera view.
- Keyboard: To change between fixed camera positions.
The project uses the following Python libraries:
- PyOpenGL: For OpenGL rendering.
- Pygame: For handling sound effects and user input.
Contributions to this project are welcome! If you have any suggestions, bug fixes, or additional features to add, feel free to open an issue or submit a pull request.
This simulation was inspired by the fascination of pendulum dynamics and the desire to create an interactive and visually appealing representation. Special thanks to the Python community for providing excellent resources and tools for OpenGL programming.
Feel free to explore and run the Python OpenGL Pendulum Simulation on your own machine. Enjoy the dynamic and immersive experience of watching the pendulum being moved by the wind with various camera perspectives and sound effects. Happy simulating!