This repository contains 7 assignments developed during the Computer Graphics course.
Each assignment demonstrates concepts such as coordinate transformations, interpolation, rasterization, and simple game development using Python.
- Convert coordinates between Cartesian and polar (and vice versa).
- Rotate point A(2,4) around origin O(0,0) by 30°.
- Apply symmetry of point A(-3,-2) with respect to center M(5,5).
- File:
tema1.py
- Implementation of Aitken’s Δ² method.
- File:
tema2.py
- Generate OXY axes and draw:
- one vertical line
- one horizontal line
- one oblique line
- Each line has a different color.
- File:
tema3.py
- Implementation of one 3D geometric transformation studied in class.
- File:
tema4.py
- Implementation of Bresenham’s line rasterization.
- File:
tema5.py
- Static objects: 2 snowmen.
- Animated objects: rotating snowflake, moving airplane.
- File:
tema6.py
- Features:
- Player moves left (A) / right (D) and shoots (Space).
- Destructible bunkers.
- Enemies arranged in 5 rows.
- Closest enemy in each column attacks.
- Score & High-Score (saved between runs).
- Files:
tema7.py
score.txt
highscore.txt
- Install dependencies:
pip install pygame numpy matplotlib
- Run a script, e.g.: python tema1.py
python tema7.py
These assignments showcase fundamental concepts in 2D/3D graphics, algorithms, and game development with Python.
Files score.txt and highscore.txt are used by the Space Invaders project to save results between runs.