CSCI 480/580 Lecture 4 - In-Class Problems

Create an OBJ file that models a square pyramid with the following geometry:

  1. Start by modeling the geometry only - get the vertex positions and faces correct. Don’t forget that triangle vertices need to be listed in counter-clockwise order from the perspective of someone looking at the “front” face of the triangle. Save your OBJ file using a text editor and drag and drop the file onto the mesh viewer to verify that you’ve got the geometry correct. In this mesh viewer, the back faces of triangles are shown in yellow, so if you see any yellow faces, you’ve probably got vertices specified in clockwise order.

  1. Next, add normals to the faceted pyramid. This won’t change the appearance in this case because the normals you’re adding are the same ones that get automatically computed from the triangle faces. When you have this correct, you should be able to check the “Show Normals” box and see the normals for each triangle pointing in the direction that triangle is facing. Don’t forget to check the triangles on the bottom of the pyramid too!

  1. Finally, let’s suppose the mesh represents some more complicated faceted shape and we want to estimate the normals. The object is faceted, so each vertex normal is just going to be the vector that’s normal to the plane that the corresponding triangle lies in. Given a 3D triangle with vertices \(\mathbf{a}, \mathbf{b}, \mathbf{c}\), derive an expression for the normal vector for that triangle.

    Some helpful reminders: