CS263 - Assignment 1


Flat, Gouraud, and Phong shading

This applet is not likely to work unless you have Sun's Java 1.2+ plug-in installed, so I have some images from the applet below. You can see the applet by following these links: Flat, Gouraud, Phong.

Flat shading



Gouraud shading



Phong shading



Object definition
house 10 7 
 8.0 16.0 30.0 
16.0 10.0 30.0 
16.0  0.0 30.0 
 0.0  0.0 30.0 
 0.0 10.0 30.0 
 8.0 16.0 54.0 
16.0 10.0 54.0 
16.0  0.0 54.0 
 0.0  0.0 54.0 
 0.0 10.0 54.0 
5 0 4 3 2 1
5 5 6 7 8 9
4 6 1 2 7
4 9 8 3 4
4 3 8 7 2
4 5 0 1 6
4 5 9 4 0

Object characteristics
Kambient : 0.5
Kdiffuse : 0.7
Kspecular: 1.0
ns       : 5.0
fAtt     : 1.0
(attenutation ignored since it's 1.0)

Viewing specification
coa 8 8 54
cp -16 -14 80
vup 0 1 0
window -1 -1 20 20
focal 20

Lighting specification
Ambient intensity (RGB): (0.3, 0.3, 0.3)
Light intensity (RGB)  : (1.0, 1.0, 0.0)
Light position         : (-92, 108, 174)