This repository contains C++ implementations of fundamental computer graphics algorithms, including DDA (Digital Differential Analyzer), Bresenham's Line Algorithm, Bresenham's Circle Algorithm, Midpoint Ellipse Algorithm, Rotational Midpoint Ellipse, and the Scan Line Polygon Algorithm. These algorithms are commonly used in computer graphics for tasks like drawing lines, circles, ellipses, and filling polygons.
Before you can use or contribute to this project, you should have the following installed on your system:
- C++ Compiler (e.g., g++)
- GLUT Library (OpenGL Utility Toolkit)
To get started with this project, follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/nightmare117/Graphics-Algorithms.git
-
Compile the cpp files using your C++ compiler
There are seperate cpp files for each algorithm. You can run any fiile and it may require some inputs from the user.
- DDA (Digital Differential Analyzer) Line Drawing Algorithm: This algorithm draws a line segment between two given points.
- Bresenham's Line Algorithm: An efficient algorithm for drawing lines.
- Bresenham's Circle Algorithm: Used for drawing circles.
- Midpoint Ellipse Algorithm: Draws ellipses based on user input.
- Rotational Midpoint Ellipse Algorithm: Draws rotated ellipses, allowing for arbitrary orientations.
- Scan Line Polygon Algorithm: Fills a polygon defined by its vertices using the scan line algorithm.
Contributions to this project are welcome! If you'd like to contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix: git checkout -b feature-name.
- Implement your changes.
- Test your changes to ensure they work as expected.
- Commit your changes: git commit -m "Add feature or fix"
- Push your changes to your fork: git push origin feature-name.
- Create a Pull Request in this repository.
Please follow the Contributing Guidelines for more details.
This project is licensed under the MIT License - see the LICENSE file for details.