THE GEORGE WASHINGTON UNIVERSITY
Department
of Computer Science
CS 6554 -
Computer Graphics II - Spring 2014
Assignment
3, Shading and Illumination Modeling
Yan Meng
Description:
The implemented system involves shading and illumination modeling.
Three shading algorithms are implemented
(Constant, Gouraud, and Phong) using Phong specular illumination model. The
light source and the camera position are assumed to be infinitely far away.
Viewing specifications are built in the system and can be easily modified
by editing a few parameters.
|
Result comparison
|
Viewing
Specification
|
Constant
Shading
|
Gouraud
Shading
|
Phong
Shading
|
Camera:
(100, 120, -100)
Reference:
(0, 0,
0)
Up:
(0, 1,
0)
d:
90
f:
110
fov:
60o
Number_of_Lights:
1
Position:
(-100, 100, -100)
I_light:
(0.5, 0.0, 0.0)
shading:
constant/gouraud/phong
Number_of_Objects:
1
Object name:
ball.d
scale:
(1, 1,
1)
translate:
(0, 0, 0)
color:
(0.1, 0.1, 0.1)
k_a:
(0.1, 0.1, 0.1)
k_d:
(0.3, 0.3, 0.3)
k_s:
(0.8, 0.8, 0.8)
n:
16
|
|
|
|
Camera:
(100, 120, -100)
Reference:
(0, 0,
0)
Up:
(0, 1,
0)
d:
90
f:
110
fov:
60o
Number_of_Lights:
1
Position:
(-100, 100, -100)
I_light:
(0.5, 0.5, 0.0)
shading:
constant/gouraud/phong
Number_of_Objects:
1
Object name:
cow.d
scale:
(1, 1,
1)
translate:
(0, 0, 0)
color:
(0.1, 0.1, 0.1)
k_a:
(0.1, 0.1, 0.1)
k_d:
(0.3, 0.3, 0.3)
k_s:
(0.8, 0.8, 0.8)
n:
16
|
|
|
|
Camera:
(100, 120, -100)
Reference:
(0, 0,
0)
Up:
(0, 1,
0)
d:
90
f:
110
fov:
60o
Number_of_Lights:
2
I_light[0]:
(0.5, 0.5, 0.0)
Loc:
(-100, 100, -100)
I_light[1]:
(0.8, 0.0, 0.0)
Loc:
(-100, -100, -100)
shading:
constant/gouraud/phong
Number_of_Objects:
2
Object[0] name:
cow.d
scale:
(1.8, 1.8,
1.8)
translate:
(0, 0, 0)
color:
(0.1, 0.1, 0.0)
k_a:
(0.1, 0.1, 0.0)
k_d:
(0.3, 0.3, 0.0)
k_s:
(0.8, 0.8, 0.0)
n:
16
Object[1] name:
bench.d
scale:
(1.0, 1.0,
1.0)
translate:
(0.5, 0.5, 0.5)
color:
(0.1, 0.1, 0.1)
k_a:
(0.1, 0.1, 0.1)
k_d:
(0.3, 0.3, 0.3)
k_s:
(0.8, 0.8, 0.8)
n:
50
|
|
|
|
©2014 - Yan Meng
|