CG Homework 6, due Thu 2016-10-13 9am

  1. (20) Extend your program from last week that displays the Starship Enterprise as follows:
    1. For each triangle, compute its surface normal in the .js file.
    2. Use that normal to compute a color for the triangle. Make the red component proportional to the X component of the normal. Make .. green .. y, blue .. z.
    3. Attend each triangle's color to its 3 vertices and send that to the vertex shader.
    4. Color the triangles accordingly. In this simple exercise, each triangle's color will be flat.
    5. Now you should start to be able to see the 3D object.

(Total: 20 points.)