In this project, you will create a renderer for arbitrary triangular meshes written in the OBJ format. The user can rotate the mesh in any direction using the mouse.
Later-week Submission Requirements
You must complete these requirements by the assignment's due date to be eligible for later-week submission:
Create your project in a folder named gyromesh in the single Git repository that you are using for all your programming assignments.
Using fetch, read in an OBJ file containing positions, normals, and triangular faces. Build a VertexAttributes instance using the unique combinations of positions and normals.
Render the mesh using diffuse shading and a perspective transformation.
Allow the user to rotate the mesh using a trackball interface.
Share in the #gyromesh channel a video of your diffuse-shaded rotating mesh. This requirement is waived if you meet the full credit requirements by the due date.
Commit and push your code to your Git repository no matter what state it is in.
If you meet these requirements, you may turn your complete project in during some later week of the semester.
Full Credit Requirements
You must complete these requirements in addition to the later-week submission requirements to receive credit for the assignment:
Read in an arbitrary OBJ file. It may or may not contain normals. Its faces may be triangles or arbitrary polygons. Compute normals if they are not defined. Decimate the faces into triangles.
Render the model with Blinn-Phong illumination.
Shift the loaded model so that it renders in the center of the viewport. The mesh's centroid should appear at \(\begin{bmatrix}0&0&0\end{bmatrix}\) in world space.
Size the viewing frustum so that it is large enough to show the whole model. When the model is rotated, no portion is clipped.
Ensure that your renderer can load arbitrary OBJ files from the web.
Share in #gyromesh videos of you rotating some of your Friddday models.
Your code must be cleanly formatted, the variable names must be meaningful, and comments should explain non-obvious code.
Your Git log should reveal a steady pattern of commits. In general, you should commit and push after every work session.
When you are ready to claim your credit, send your instructor a direct message. Ensure that all requirements have been met. If they have not, you will not receive credit and will have to submit again some other week.