A collection of interactive graphics animations and games built from scratch with Python, PyOpenGL and GLUT,
progressing from pixel-level 2D rendering to real-time 3D worlds.
Projects • Concepts • Getting Started • Structure • Author
|
An endless 3D runner with procedurally generated tracks, 5 levels with their own speeds and colour themes,
shield power-ups, full-screen mode, background music and precise rotated-hitbox collision (Separating Axis Theorem).
→ View the full project in its own repository |
| # | Project | Type | Highlights |
|---|---|---|---|
| 01 | House in Rainfall | 2D | GL_POINTS / GL_LINES / GL_TRIANGLES only · rain bending · day ↔ night |
| 01 | Amazing Box | 2D | Random diagonal particles · wall bouncing · blink · freeze |
| 02 | Catch the Diamonds | 2D game | Midpoint line algorithm · 8-zone symmetry · AABB collision · delta time |
| 03 | Bullet Frenzy 3D | 3D game | Transformations · gluPerspective · third- & first-person cameras · cheat mode |
| Concept | 01 Rainfall | 01 Box | 02 Diamonds | 03 Bullet Frenzy |
|---|---|---|---|---|
| Primitive rendering (points, lines, triangles, quads) | ✅ | ✅ | ✅ | ✅ |
| Orthographic projection | ✅ | ✅ | ✅ | |
| Rasterization — Midpoint Line Algorithm & 8-way symmetry | ✅ | |||
| 3D transformations (translate · rotate · scale) | ✅ | |||
Perspective projection & camera (gluLookAt) |
✅ | |||
Hierarchical modelling (glPushMatrix / glPopMatrix) |
✅ | |||
| Animation loop & delta-time movement | ✅ | ✅ | ✅ | ✅ |
| Keyboard & mouse interaction | ✅ | ✅ | ✅ | ✅ |
| Collision detection | ✅ | ✅ | ✅ | |
| Game states (play · pause · game over · restart) | ✅ | ✅ | ✅ |
git clone https://github.com/k-a-tha/CSE423-Computer-Graphics-BRACU.git
cd CSE423-Computer-Graphics-BRACUpip install -r requirements.txtGLUT not found? Platform notes
| Platform | What to do |
|---|---|
| Windows | If you see NullFunctionError / glutInit errors, install a PyOpenGL wheel that bundles freeglut, or place freeglut.dll next to the script. |
| macOS | GLUT ships with the system — pip install PyOpenGL is enough. |
| Linux | sudo apt install freeglut3-dev (Debian/Ubuntu) or the equivalent for your distro. |
python 01-interactive-2d-graphics/house-in-rainfall/house_rainfall.py
python 01-interactive-2d-graphics/amazing-box/amazing_box.py
python 02-catch-the-diamonds/catch_the_diamonds.py
python 03-bullet-frenzy-3d/bullet_frenzy.pyEach project folder has its own README with the full controls and the assignment question file, features and implementation notes.
CSE423-Computer-Graphics-BRACU/
├── 01-interactive-2d-graphics/
│ ├── house-in-rainfall/
│ │ ├── house_rainfall.py
│ │ ├── media/
│ │ └── README.md
│ ├── amazing-box/
│ │ ├── amazing_box.py
│ │ ├── media/
│ │ └── README.md
│ ├── LAB_01.png
| └── README.md
├── 02-catch-the-diamonds/
│ ├── catch_the_diamonds.py
│ ├── media/
| ├── LAB_02.pdf
│ └── README.md
├── 03-bullet-frenzy-3d/
│ ├── bullet_frenzy.py
│ ├── media/
| ├── LAB_03.pdf
│ └── README.md
├── assets/
│ ├── banner.svg
│ └── block_horizon_war_3d_preview.png
├── requirements.txt
├── LICENSE
└── README.md
| Language | Python 3 |
| Graphics | OpenGL (fixed-function pipeline) via PyOpenGL · GLU · GLUT (freeglut) |
| Standard library | math · random · time · threading |
Ridita Katha · @k-a-tha
Built as for coursework for CSE423: Computer Graphics, Department of Computer Science and Engineering, BRAC University.
Released under the MIT License.
