A Python-based OpenGL application that demonstrates 3D primitive animations with transformation effects.
- Two interactive scenes with different 3D primitives
- Smooth animations between states
- Keyboard controls for scene interaction
- Singleton pattern for scene management
- Clean separation of concerns (window management, rendering, scene management)
- Python 3.x
- PyOpenGL
- PyOpenGL-accelerate (optional, but recommended)
It's recommended to use a virtual environment:
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On Windows:
.\venv\Scripts\Activate.ps1
# On Unix or MacOS:
source ./venv/bin/activate
pip install -r requirements.txt
Run the application:
python main.py
- Spacebar: Toggle animation between scenes
- First scene: Cube with expanding sphere
- Second scene: Tetrahedron and rotating torus
main.py
- Application entry pointsrc/
window.py
- GLUT window managementrenderer.py
- OpenGL rendering logicscene_manager.py
- Scene state and animation controlconfig.py
- Configuration constantscolors.py
- Color definitions
Detailed explanation of how this application works (in Russian) can be found in docs/detailed_explanation_ru.md.