As there is no adequate code available for computer graphics in C language, this repository contains a bash script for practical exercises for the Computer Graphics course in MU Engineering SEM III. This repository's primary goal is to give teachers and students a one stop resource for referencing and studying.
To setup the required environment, you need to install certain packages. Run the following commands in your terminal:
sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev
sudo apt-get install opengl* freeglut*
sudo apt-get install g++These commands will install the necessary OpenGL libraries and the g++ compiler on your system.
To run this bash script Give permission
chmod 777 ./m.sh| NO. | Name | Code Name |
|---|---|---|
| 1 | Simple Line Drawing | basic |
| 2 | Digital Differential Analyzer | dda |
| 3 | Bresenham Line Drawing Algorithm | bba |
| 4 | Midpoint Circle Algorithm | circle |
| 5 | midpoint Ellipse algorithm | ellipse |
| 6 | Boundary Fill | bfill |
| 7 | Flood Fill | ffill |
| 8 | Polygon Filling | pfill |
| 9 | Bezier Curve | bcurve |
| 10 | 2D Transformations | trans |
| 11 | Line Clipping Algorithm | cohen |
Run script with argument
./m.sh [code name]