Revision lecture

Info icon This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Interactive Computer Graphics: 
 Revision Lecture " Graphics Revision Lecture: Slide 1! Shading" 1 Shading A scene is defined as a regular array of planar quadrilaterals part of which is shown in the figure. P0 P3 P1 P2 P0 P1 P2 P3 x 1 6 7 0 y 6 6 0 2 z 10 10 12 12 The scene is illuminated by one light source which is located at the origin. The viewpoint is also at the origin and the view direction is along the positive z axis. Only diffuse shading is used. a Outline the different steps necessary to calculate the shading value for each pixel inside the projected quadrilateral using Gouraud shading. The scene is illuminated by one light source which is located at the origin. The viewpoint is also at the origin and the view direction is along the positive z axis. Only diffuse shading is used. Shading" a Outline the different steps necessary to calculate the shading value for each pixel inside the projected quadrilateral using Gouraud shading. b Explain how your answer to part a must be modified to compute the shading value for each pixel inside the projected quadrilateral using Phong shading instead of Gouraud shading. c What effects can be demonstrated with Phong shading that cannot be created by Gouraud shading? d Calculate the outer surface normal vector (i.e. the one that is directed towards the viewpoint) for the central quadrilateral. e Assume that only flat diffuse shading is being used, the constant for diffuse reflection is k d = 1 and that the light source is a white light with the following intensity: r = 255, g = 255, b = 255. Calculate the shading value at the centre of the quadrilateral. The five parts carry, respectively, 25%, 15%, 20%, 20%, and 20% of the marks. Specular highlights can be represented accurately in Phong Shading, but not in Gouraud shading. Marks: d 4 Shading" Calculate the outer surface normal vector (i.e. the one that is directed towards the viewpoint) for the central quadrilateral. First find two vectors on the plane: p1 p0 p0 = [6, 6, 10] p3 = [1, 6, 10] [1, 6, 10] = [5, 0, 0] [0, 2, 12] = [1, 4, 2] Find the cross product: [0, 10, 20] or [0, 1, 2] for simplicity, however this is facing away from the viewpoint (since [0, 1, 2] · [0, 0, 1] = 2 > 0), so the answer p p is [0, 1, 2] or [0, 1/ 5, 2/ 5]. Marks: e Assume that only flat diffuse shading is being used, the constant for diffuse reflection is k d = 1 and that the light source is a white light with the following intensity: r = 255, g = 255, b = 255. Calculate the shading value at the centre of the quadrilateral. i) Average the vertices to find a central point [3.5, 3.5, 11.25]. 4 facing away from the viewpoint (since [0, 1, 2] · [0, 0, 1] = 2 > 0), so the answer p p is [0, 1, 2] or [0, 1/ 5, 2/ 5]. Marks: e 4 SAssume that only flat diffuse shading is being used, the constant for diffuse hading" reflection is k d = 1 and that the light source is a white light with the following intensity: r = 255, g = 255, b = 255. Calculate the shading va...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern