C1
C2
C3
this interior shading missed!
C1
C2
C3
this vertex shading spread
over too much area
N1
N2
N3
N4
Itotal = kaIambient + Ii kd n ! l i( ) + ks v ! ri( )nshiny( )
i=1
# lights
"remember: normals used in
diffuse and specular terms
discontinuity in normal’s rate of
change harder to detect
Gouraud Phong
zyx NNN ,,
C1
C2
C3
edge: mix of c1, c2
edge: mix of c1, c3 interior: mix of c1, c2, c3
321PPPP !+!+!= "#$
1P
3P
2P
P
5.0=!
1=!
0=!1,,0
1
!!
=++
"#$
"#$
1,,0 ,1 with
321
!"#$!="+#+$
%"+%#+%$= xxxx
x =!x1+ "x
2+ #x
3 with
! = A1/A
" = A2/A
# = A3/A
A1=1
2(x
2! x
1) " (x ! x
1)
r1= Ax
1+ By
1+ C
r2= Ax
2+ By
2+ C
r3= Ax
3+ By
3+ C
!="#+minxxxx )( 121
)(WEC)(WEC
)(WEC
)()(
21
1
12
1
12
1
xx
x
xxxx
xx
xx
xx
LL
L
minmin
min
min
!=
!!!
!=
!
!="