Professional Documents
Culture Documents
I computed the normal for each triangle in the mesh. I added the triangle normal to a sum for each time a triangle
normal was computed for the corresponding vertex. After which, the vertex normal is averaged.
YouTube Video
https://youtu.be/HLPd5lesSDk
To rotate the teapot about the Y-axis, I transformed the ModelView matrix as described on OpenGL’s website
https://open.gl/transformations in which the transformation is:
cos 𝜃𝜃 0 sin 𝜃𝜃 0
0 1 0 0
� �
−sin 𝜃𝜃 0 cos 𝜃𝜃 0
0 0 0 1