Assignment 1

This assignment was to implement basic shading calculations using the Phong reflection model.

Group Members:


Diffuse only shading from a single light source.

./as1 -kd 0 1 0 -dl -1 -1 -1 1 1 1


Specular only shading from a single directional light source

./as1 -ks .5 .5 .8 -dl -1 -1 -1 1 1 1


Specular only shading from a single point light source

./as1 -ks .5 .5 .8 -pl 1 1 1 1 1 1


Combined specular and diffuse shading

./as1 -ks .1 .8 .2 -kd .1 .4 .8 -dl 0 1 -1 1 1 1 -sp 10


Anisotropic specularity with high spv

./as1 -pl -4 6 3 1 1 1 -ks 0.9 0.3 0.4 -kd 0.6 0.4 0.4 -spu 1 -spv 100


Anisotropic specularity with high spu

./as1 -pl -4 6 3 1 1 1 -ks 0.9 0.3 0.4 -kd 0.6 0.4 0.4 -spu 100 -spv 1


Multiple light sources

./as1 -ka .2 .2 .2 -ks .5 .5 .5 -kd .5 .5 .5 -sp 100 -dl 0 -1 0 0 .2 .4 -pl 2 -1 2 .8 .2 0 -dl 1 1 -1 0 .8 .3


Ashikhmin-Shirley shading with high spv

./as1 -ks .5 .5 .5 -kd .5 .5 .5 -spu 1 -spv 50 -dl 0 -1 -5 5 1.3 1.5 -asm


Ashikhmin-Shirley shading with high spu

./as1 -ks .2 .2 .2 -kd .5 .5 .5 -spu 500 -spv 10 -dl -5 5 -5 3 1 2 -asm


Toon shading with single light source

./as1 -ka .3 .3 .3 -kd .3 .3 .3 -ks .3 .3 .3 -sp 100 -dl -2 -2 -2 .3 1 .5 -toon


Toon shading with multiple light sources

./as1 -ka .3 .3 .3 -kd .3 .3 .3 -ks .3 .3 .3 -sp 1000 -pl 1.4 1.4 1.4 .3 1 .5 -toon -pl 16 16 16 .9 .4 .3