Skip to content

About

This repository contains a collection of assignment based projects as coursework developed by using Python and PyOpenGL. Spanning from foundational 2D rendering to interactive 3D applications, explores core computer graphics concepts, including graphics algorithms, geometric transformations, animation, real-time rendering, and user interaction.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

Computer Graphics · OpenGL

Python PyOpenGL GLUT MIT License

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


🎮 Projects

House in Rainfall
01 · House in Rainfall
2D scene with animated, steerable rain and a day–night cycle
Amazing Box
01 · Amazing Box
Bouncing particle simulation with speed, blink and freeze controls
Catch the Diamonds
02 · Catch the Diamonds
Arcade game drawn entirely with the Midpoint Line Algorithm
Bullet Frenzy 3D
03 · Bullet Frenzy 3D
3D shooter with perspective cameras, enemies and auto-aim cheat mode

✨ Featured Project

Block Horizon War 3D 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

🧠 Concepts Covered

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) ✅ ✅ ✅

🚀 Getting Started

1. Clone the repository

git clone https://github.com/k-a-tha/CSE423-Computer-Graphics-BRACU.git
cd CSE423-Computer-Graphics-BRACU

2. Install the dependencies

pip install -r requirements.txt
GLUT 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.

3. Run any project

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.py

Each project folder has its own README with the full controls and the assignment question file, features and implementation notes.


📁 Repository Structure

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

🛠️ Tech Stack

Language Python 3
Graphics OpenGL (fixed-function pipeline) via PyOpenGL · GLU · GLUT (freeglut)
Standard library math · random · time · threading

👤 Author

Ridita Katha · @k-a-tha

Built as for coursework for CSE423: Computer Graphics, Department of Computer Science and Engineering, BRAC University.

📄 License

Released under the MIT License.

About

This repository contains a collection of assignment based projects as coursework developed by using Python and PyOpenGL. Spanning from foundational 2D rendering to interactive 3D applications, explores core computer graphics concepts, including graphics algorithms, geometric transformations, animation, real-time rendering, and user interaction.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages