This project is a simple implementation of rasterization in computer graphics, which involves converting geometric primitives such as points, lines, and polygons into a raster format suitable for rendering on a display. The project is designed for educational purposes, helping students understand the fundamentals of rasterization and its role in computer graphics.
The main goal of this project is to practice the basic principles of rasterization, including:
- Drawing points and lines using Bresenham's line algorithm
- Filling polygons using scanline algorithm
- Implementing transformations, such as translation, scaling, and rotation
- Clipping lines and polygons using Cohen-Sutherland and Sutherland-Hodgman algorithms
The project is developed using C++ and OpenGL, and it provides a simple user interface to interact with the implemented features.
- C++ compiler with C++11 support
- OpenGL and GLUT libraries
- Clone the repository:
git clone https://github.com/znatri/cs3451_p1_rasterization.git
- Navigate to the project directory:
cd cs3451_p1_rasterization
- Compile the project:
make
- Run the compiled executable:
./rasterization
The user interface allows you to interact with the implemented features through keyboard shortcuts:
P
: Draw pointsL
: Draw linesF
: Fill polygonsT
: Apply translationS
: Apply scalingR
: Apply rotationC
: Clip lines and polygons
This project is for educational purposes and is not actively maintained. However, if you have any suggestions, issues, or improvements, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more information.
The project was developed as part of the CS3451 - Computer Graphics course at Georgia Institute of Technology.