From-scratch implementations of various drawing, viewing, and rendering techniques. Uses OpenGL/GLUT as a base, but most library functions were not used.
If you found this repository while doing an assignment, don't look at the code until after you are done with yours and do NOT use my code. Open up that textbook and get good.
Renders a checkerboard pattern to a .ppm file
Draws lines/circles using the midpoint line/circle algorithm.
Use L or C to enter a mode, and click to create two points.
Draws triangles with a given shading mode.
Press W, F, or G to enter a mode, and click to create three points.
Renders a simple house-like object from a set of vertices and a transformation matrix.
Left click with or without shift to pan the camera, Middle click to rotate, and Right click to zoom.
Use P to toggle perspective.
HW4.mp4
Renders .obj files in wireframe or with flat shading.
Press W, F to change modes, and Z to toggle Z-buffering
Load the model with function keys (F1, F2, F3, etc)
Renders .obj files with Gouraud or Phong shading.
Press G, P to change modes, H to toggle highlights
Load the model with function keys (F1, F2, F3, etc)
Renders three spheres to a .ppm file.
The homework template code's .obj loader uses several RegExs to parse the model file. Removing these speeds up model loading for HW5 and HW6 by several orders of magnitude. Check the fastload branch for the faster loader.
Note that both the original and new loader do not fully implement the .obj format.
This code should compile with whatever version of g++ in a Linux environment. If you have VS Code, you can select which HW number to run in the "run and debug" tab, and press F5.
To build and run without VS Code, see .vscode/launch.json and .vscode/tasks.json for build and running commands.
IGNORE the devcontainer unless you need to use an environment similar to the one used for grading.