You can expect the Final Exam (on Wednesday, December 17) to contain problems similar to some of these.
R = 0.4 × 1.0. = 0.4.Result: The ambient component of the Phong Model is (0.4, 0.2, 0.0).
G = 0.4 × 0.5. = 0.2.
B = 0.4 × 0.0. = 0.0.
R = 0.8 × 1.0 × 1.0. = 0.8.Result: The diffuse component of the Phong Model is (0.8, 0.4, 0.0).
G = 0.8 × 1.0 × 0.5. = 0.4.
B = 0.8 × 1.0 × 0.0. = 0.0.
R = 0.4 + 0.8 = 1.2.We obtain (1.2, 0.6, 0.0). We complete our computation by clamping all values greater than 1.0 to 1.0. Result: The final Phong-Model color is (1.0, 0.6, 0.0).
G = 0.2 + 0.4 = 0.6.
B = 0.0 + 0.0 = 0.0.
glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1);
(P1 – P0) × (P2 – P0)and normalizing.