Skip to content

Repository files navigation

Computer Graphics Lab Report

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.

Overview

2D Graphics Algorithms:

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

3D Graphics Transformations:

  • Translation, scaling, rotation, reflection, and shearing in 3D space.

Libraries Used

  • Matplotlib: For plotting 2D/3D graphics
  • Pygame: For interactive rendering

Installation & Usage

  1. Prerequisites:

    • Python 3.x
    • Install dependencies:
      pip install matplotlib
      pip install pygame
  2. 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

About

This repository contains all the lab code for the Computer Graphics course (Computer Engineering, IOE), implemented in Python.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages