- 2074 Asoj · 12 marks
Gouraud intensity at midpoint P
Short answer
Assuming the polygon is a flat surface with unit normal (-0.1037, -0.1098, 0.9885), the vertex intensity computed is 14.85. Since all vertex intensities are equal, Gouraud interpolation yields intensity 14.85 at the midpoint P.
[Figure: a rectangle/triangle scene with vertices (1,10,1), (10,10,1), (1,5,0), (1,1,-1), (10,1,1); scan line y = 3 meets the polygon edges at points a and b, with P the midpoint of ab.] Find out the intensity of light reflected from the midpoint P on scan line y = 3 in the above given figure using Gouraud shading model. Consider a single point light source located at positive infinity on Z-axis and assume vector to the eye as (1,1,1). Given d = 0, K = 1, Ia = 1, IL = 10, Ks = 2, Ka = Kd = 0.8 for use in a simple illumination model.
Assumptions. The figure gives no vertex normals, so the polygon is treated as one flat surface and all vertices use its unit normal. The polygon (1,10,1), (10,10,1), (10,1,1), (1,1,−1), (1,5,0) is only approximately planar; its best-fit normal (from Newell's method) is (17, 18, −162), and the side facing the light is taken, N = (−17, −18, 162)/|…| = (−0.1037, −0.1098, 0.9885). The specular exponent is not given, so n = 1 is assumed.
Light: point source at +∞ on the z-axis, so L = (0, 0, 1). Eye: V = (1,1,1)/√3 = (0.5774, 0.5774, 0.5774). With d = 0 and K = 1, the attenuation factor is 1/(d + K) = 1.
Model: I = Ka·Ia + [IL/(d + K)] · [ Kd (N·L) + Ks (R·V)^n ]
Step 1: dot products
- N·L = 0.9885
- R = 2(N·L)N − L = (−0.2051, −0.2172, 0.9544)
- R·V = 0.5774·(−0.2051 − 0.2172 + 0.9544) = 0.3072
Step 2: vertex intensity (same for all vertices)
- Ambient: Ka·Ia = 0.8·1 = 0.8
- Diffuse: 10 · 0.8 · 0.9885 = 7.908
- Specular: 10 · 2 · 0.3072 = 6.144
- I = 0.8 + 7.908 + 6.144 = 14.85
Step 3: scan line y = 3 The line crosses the edge (1,5,0)–(1,1,−1) at a and the edge (10,10,1)–(10,1,1) at b.
- a = (1, 3, −0.5)
- b = (10, 3, 1)
- Midpoint P = (5.5, 3, 0.25)
Edge interpolation (linear in y), with the end-point intensities all equal to 14.85:
- I_a = ((3 − 1)/(5 − 1))·14.85 + ((5 − 3)/(5 − 1))·14.85 = 14.85
- I_b = 14.85 (both ends of the right edge have intensity 14.85)
Scan-line interpolation at the midpoint P (x_p halfway between x_a = 1 and x_b = 10): I_P = ((x_b − x_p)/(x_b − x_a))·I_a + ((x_p − x_a)/(x_b − x_a))·I_b = 0.5·14.85 + 0.5·14.85
Answer: I_P ≈ 14.85 under these assumptions. If different vertex normals were given, the vertex intensities would differ, and the same two interpolation steps would apply (the midpoint value is then (I_a + I_b)/2).
Related questions
- Gouraud shading for polygon rendering · Computer Graphics, chapter 8 · asked 6×
- Intensity at centroid of a triangle · Computer Graphics, chapter 8
- Compare Gouraud and Phong shading · Computer Graphics, chapter 8 · asked 7×
- Flat (constant intensity) shading · Computer Graphics, chapter 8 · asked 2×
- Polygon table and normal of S1 · Computer Graphics, chapter 6
- Polygon tables to model Dharahara · Computer Graphics, chapter 6
- Thin film interference by reflected light · Engineering Physics, chapter 4 · asked 2×
- Single point ground above 1 MHz · Instrumentation II, chapter 6
- Area of triangle and rectangle program · Object Oriented Programming, chapter 3
- A3 curve meets critical depth line normally · Hydraulics, chapter 8