Assignment 1 (Home)

Phong Illumination Model - Point and Directional Lights

Program takes in a series of command line options:

Outputs

Single Point Light (Diffuse only)


./as1 -kd .8 .8 .8 -pl 1 0 2 .8 .5 .8 -ka .1 .1 .1 -o diffuse-single.png

Single Point Light (Specular only)


./as1 -ks .8 .8 .8 -pl -1 0 2 .9 .6 .3 -sp 5 -ka .2 .2 .2 -o specular-point.png

Single Directional Light (Specular only)


./as1 -ks .8 .8 .8 -dl 1 0 -2 .3 .6 .9 -sp 5 -ka .2 .2 .2 -o specular-directional.png

Single Directional Light (Specular and Diffuse)


./as1 -ks .9 .9 .9 -dl -2 0 -4 .9 .8 .6 -sp 5 -kd .9 .9 .9 -o specular-diffuse.png

Anisotropic and Specular

./as1 -spu 10 -spv 2 -ks .9 .9 .9 -dl -1 -1 -1 .7 .9 .9 -ka .2 .2 .2 -o anisotropic-specular.png

Multiple Lights

./as1 -kd .7 .5 .8 -ks .5 .8 .7 -sp 2 -dl -1 -1 -1 1 1 1 -pl 1 0 1 1 0 0 -pl -5 3 1 1.0 0.5 1.0 -dl 1 3 0 0.2 1.0 0.8
-o multiple-lights.png

Ashikhmin Shirley Model

./as1 -spu 10 -spv 5 -kd 1.0 1.0 1.0 -ks 1.0 1.0 1.0 -dl -1 1 0 1.0 1.0 1.0 -dl 1 1 -1 .9 .9 .6 -dl 0 -2 -1 .2 .7 .9 -dl 1 1 1 .9 .6 .3 -dl -1 -1 -1 .7 .4 .9 -asm -o ashikhmin-shirley.png

Toon

./as1 -sp 2 -kd .3 .3 .3 -ks .3 .3 .3 -dl -1 1 -1 .7 .7 .7 -dl 1 1 -1 .6 .6 .3 -dl 0 -2 -1 0 .5 .7 -dl 1 1 1 .9 .6 .3 -dl -1 -1 -1 .7 .4 .9 -toon -o toon.png