Then need subdivision or some other
technique.
for each polygon P
Finally,
I = Iaka + Ipkd (N * L) + ks(N * H)n
IMPLEMENTATION OF ILLUMINATION MODELS
I = Iaka + Ipkd (N * L) + ks(N * H)n
da = Iaka + lpkd ( N*L)I = da + (1-da)Ipks ( N*L)n
DITHERING
Convert color to intensity by:
intensity = (int)(16*(.299*red + .587*green + .114*blue)+.5)
This is the NTSC intensity formula(Y) (what is shown on B&W TVs)
0 8
2 10
12 4
14 6
3 11
1 9
15 7
13 5
1) calculate the intensity
2) if (dither[x%4, y%4] >= intensity) then plot(x,y)