Illumination and Shading for computer graphics class
- by Sam I Am
I am preparing for my test tomorrow and this is one of the practice questions. I solved it partially but I am confused with the rest. Here is the problem:
Consider a gray world with no ambient and specular lighting ( only diffuse lighting). The screen coordinates of a triangle P1,P2,P3, are P1=(100,100), P2= (300,150), P3 = (200, 200). The gray values at P!,P2,P3 are 1/2, 3/4, and 1/4 respectively. The light is at infinity and its direction and gray color are (1,1,1) and 1.0 respectively. The coefficients of diffused reflection is 1/2. The normals of P1,P2,P3 are N1= (0,0,1), N2 = (1,0,0), and N3 = (0,1,0) respectively. Consider the coordinates of three points P1,P2,P3 to be 0. Do not normalize the normals.
I have computed that the illumination at the 3 vertices P1,P2,P3 is (1/4,3/8,1/8).
Also I computed that interpolation coefficients of a point P inside the triangle whose coordinates are (220, 160) are given by (1/5,2/5,2/5).
Now I have 4 more questions regarding this problem.
1) The illumination at P using Gouraud Shading is:
i) 1/2
The answer is 1/2, but I have no idea how to compute it..
2) The interpolated normal at P is given by
i) (2/5, 2/5,1/5)
ii) (1/2, 1/4, 1/4)
iii) (3/5, 1/5, 1/5)
3) The interpolated color at P is given by:
i) 1/2
Again, I know the correct answer but no idea how to solve it
4) The illumination at P using Phong Shading is
i) 1/4
ii) 9/40
iii) 1/2