- Flat painter
- Gouraud painter
Useful help from this article: https://hackernoon.com/computer-graphics-scan-line-polygon-fill-algorithm-3cb47283df6
Given some points in the .mat file, the following steps are implemented and demonstrated in the demo file:
- Translation
- Rotation
- Translation
- Calculation of the perspective projection for two different cameras
- Calculate the ambient, diffuse and specular light
- Use the sum of them to paint an image using either Gouraud or Phong shading
- Calculate the normal vectors and the projection of the 3D object to 2D