This repository contains the codebase for a simple application in OpenGL written in Python. The following features are available in this application.
Sphere Rendering Application:
-
Initial Setup:
- [✅] Create a windowed application that renders 36 spheres in a 6x6 grid-like pattern.
-
Shading:
- [✅] Applied a shading model to the spheres.
- [✅] Used an orthographic camera for consistent visibility.
-
Parameter Variation:
- [✅] Choose diffuse and spectral parameters of the shading model and change these parameters linearly over the two axes (left to right, and top to bottom).
-
Interactive Color Change:
- [✅] Register mouse-click events that trigger a color change of the clicked sphere to the normal color at that point colorized.
-
Deselection and Exit:
- [✅] Register mouse-click to deselect the previous change on the sphere and return to normal when a click event occurs outside any sphere.
- [✅] Trigger application exit by pressing the ESC key.
- Python==3.8.18
- pygame==2.5.2
- pyopengl==3.1.6
- pyopengl-accelerate==3.1.7
- glfw==2.6.4
Clone the Repository:
git clone https://github.com/Sidd1609/Avataar_Sphere.git
cd Avataar_Sphere
#Install the requirements
pip install -r requirements.txt
#Execute the Windowed Application by running the script
python3 6Spheres_main.py
Please find more details of the code breakdown and idea discussions in the PPT file here.
- Sri Siddarth C
This project is licensed under the MIT License - see the LICENSE file for details.