This question is implemented by Itisha Patidar (B17CS026).
The midpoint line drawing algorithm is implemented in C++. The program randomly generates x and y-coordinates for 2 points with in the range 10-400 for both x and y coordinates. It then draws the line from point-1 to point-2.
The code can be found in file named Line_Drawing.cpp
This question is implemented by Geetesh Gupta (B17CS024).
The triangle rasterization using Boundary Box Algorithm with barycentric coordinates is implemented in C++.
The program generates a triangle with coordinates within the range 10-400 for both x and y coordinates.
The code can be found in file named Triangle_BoundaryBox.cpp
The triangle rasterization using extended Midpoint Line Algorithm is implemented in C++.
The program generates a triangle with coordinates within the range 10-400 for both x and y coordinates.
The Midpoint Line algorithm first generates the boundaries using the coordinates and then, row-by-row scan to fill the pixels lying between the boundaries generated.
The code can be found in file named Triangle_ExtendedLine.cpp
The triangle rasterization using Boundary Box Algorithm and applying SuperSampling at 4x resolution is implemented in C++.
The program generates a traingle with coordinates within the range 10-400 for both x and y coordinates by first generating a buffer matrix with 4x size and coordinates, applying the Part A algorithm and then averaging back in terms of 4x4 matrix and displaying the result.
The code can be found in file named Triangle_Supersampling.cpp
This question is implemented by Itisha Patidar (B17CS026).
The midpoint Circle drawing algorithm is implemented in C++. The program generates a circular arc from 135-215 degree of a circle centered at origin and has radius 100.
The code can be found in file named Circle_Drawing.cpp
Standard OpenGL for CPP procedures are to followed to run the files.
- Setup OpenGL in CodeBlocks or Visual Studio.
- Create a freeglut Project.
- Import file then build and run the project.
g++ filename.cpp -lGL -lGLU -lglut