Welcome to the CG (Computer Graphics) Practical Codes Repository! ๐
This repository contains C implementations of various computer graphics algorithms and techniques i did in 3rd Semester of my CS Degree. Whether you're a newbie learning computer graphics or a junior looking for reference implementations, you've come to the right place! ๐ฅ๏ธ
- 2DLineClip.cpp: Implementation of 2D line clipping algorithm.
- 2DReflection.cpp: Implementation of 2D reflection about different axes.
- 2DRotation.cpp: Implementation of 2D rotation around a point.
- 2DScaling.cpp: Implementation of 2D scaling transformation.
- 2Dtranslation.cpp: Implementation of 2D translation transformation.
- 3DTransformation.cpp: Implementation of 3D transformations.
- 3dTranslation.cpp: Implementation of 3D translation transformation.
- BLA.cpp: Implementation of Bresenham's Line Drawing Algorithm.
- DDA.cpp: Implementation of Digital Differential Analyzer (DDA) Line Drawing Algorithm.
- MidpointCircle.cpp: Implementation of Midpoint Circle Drawing Algorithm.
- MidpointEllipse.cpp: Implementation of Midpoint Ellipse Drawing Algorithm.
Each .cpp
file contains the implementation of a specific algorithm. To use any of these implementations, simply compile the respective file using a C++ compiler such as g++:
g++ 2DLineClip.cpp -o 2DLineClip && ./2DLineClip
For Linux Systems, refer to the run.txt or simply, run:
g++ -o ellip MidpointEllipse.cpp -lglut -lGLU -lGL && ./ellip
Replace 2DLineClip.cpp
and 2DLineClip
with the name of the desired file and executable, respectively.
Feel free to explore the code, experiment with different parameters, and integrate these algorithms into your own projects! โจ
If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request. Contributions from all skill levels are welcome! ๐
Cheers x ๐