Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 737 Bytes

File metadata and controls

19 lines (15 loc) · 737 Bytes

Computer-Graphics

Part #1 - Scanline triangle filling algorithm

  • Flat painter
  • Gouraud painter

Useful help from this article: https://hackernoon.com/computer-graphics-scan-line-polygon-fill-algorithm-3cb47283df6

Part #2 - Transformation and Projection method

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

Part #3 - Light Calculation and Rendering

  • 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