Skip to main content

Intensity at centroid of a triangle

Short answer

Centroid is (0.6667, 0.6667, 1), triangle lies in z=1 plane with normal (0,0,1). Using light at (2,2,6) and viewer at (2,3,6), Phong model gives ambient 0.05, diffuse 0.4491, specular 0.0069, total 0.506.

Find out the total intensity at the centroid of a triangle defined by A(2,1,1), B(0,1,1), C(0,0,1), when illuminated by a point light source of intensity IL = 0.6 at (2,2,6) using illumination model. The viewer is at (2,3,6). Assume ambient intensity Ia = 0.1 and parameters: ka = 0.5, kd = 0.8, ks = 0.7, take n = 10. [centroid: (x1 + x2 + x3)/3, (y1 + y2 + y3)/3, (z1 + z2 + z3)/3]

Model (Phong): I = ka·Ia + IL [ kd (N·L) + ks (R·V)^n ]

Step 1: centroid G = ((2 + 0 + 0)/3, (1 + 1 + 0)/3, (1 + 1 + 1)/3) = (0.6667, 0.6667, 1)

Step 2: normal. All three vertices have z = 1, so the triangle lies in the plane z = 1. N = (0, 0, 1) (towards the light and the viewer, both at z = 6).

Step 3: vectors

  • L = light − G = (2 − 0.6667, 2 − 0.6667, 6 − 1) = (1.3333, 1.3333, 5); |L| = 5.3438 → L = (0.2495, 0.2495, 0.9357)
  • V = viewer − G = (2 − 0.6667, 3 − 0.6667, 6 − 1) = (1.3333, 2.3333, 5); |V| = 5.6765 → V = (0.2349, 0.4111, 0.8808)

Step 4: dot products

  • N·L = 0.9357
  • R = 2(N·L)N − L = (−0.2495, −0.2495, 0.9357)
  • R·V = −0.2495·0.2349 − 0.2495·0.4111 + 0.9357·0.8808 = −0.0586 − 0.1026 + 0.8242 = 0.6630
  • (R·V)^10 = 0.6630^10 = 0.0164

Step 5: components

TermCalculationValue
Ambientka·Ia = 0.5 × 0.10.0500
DiffuseIL·kd·(N·L) = 0.6 × 0.8 × 0.93570.4491
SpecularIL·ks·(R·V)^n = 0.6 × 0.7 × 0.01640.0069
Total0.5060

Answer: I ≈ 0.506. (No distance attenuation is used since none is specified. If the halfway-vector form (N·H)^n is used instead, the specular term is about 0.166 and the total about 0.666.)

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Graphics chapter 8 questions →