This repository contains the complete set of lab codes for the Computer Graphics course (Computer Engineering, IOE), implemented in Python. It includes implementations of various 2D and 3D graphics algorithms using Matplotlib and Pygame for visualization.
- DDA (Digital Differential Analyzer): Line drawing algorithm.
- Bresenham's Line Algorithm: Optimized line drawing algorithm.
- Midpoint Circle Algorithm: Circle drawing algorithm.
- Ellipse Drawing Algorithm: Generates elliptical shapes.
- 2D Transformations: Translation, scaling, rotation, reflection, and shearing.
- Translation, scaling, rotation, reflection, and shearing in 3D space.
- Matplotlib: For plotting 2D/3D graphics
- Pygame: For interactive rendering
-
Prerequisites:
- Python 3.x
- Install dependencies:
pip install matplotlib pip install pygame
-
Running the code:
git clone <repository-url> cd computer-graphics-lab-report python <script_name>.py # e.g., dda.py, bresenham.py, etc.
3.Notes: -All scripts are self-contained with comments -Matplotlib for static plots, Pygame for interactive graphics -Ensure system meets Pygame's requirements for smooth rendering