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 involve texture mapping which is implemented by using the cylinder and sphere as intermediate surface. First the texture is loaded into a 2D array and then object points are mapped to the corresponding [u, v] coordinates. Phong shading model is also implemented with the texture mapping. Viewing specifications are built in the system and can be easily modified.
|
Result comparison
|
Viewing
Specification
|
Cylinder mapping
|
Sphere mapping
|
texture files
|
Camera:
(100, 120, -100)
Reference:
(0, 0,
0)
Up:
(0, 1,
0)
d:
90
f:
110
fov:
60o
zoom in: 60
Number_of_Lights:
1
Position:
(-100, 100, -100)
I_light:
(0.5, 0.5, 0.5)
shading:
phong
Number_of_Objects:
1
Object name:
ball.d
scale:
(1, 1,
1)
translate:
(0, 0, 0)
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
zoom in: 60
Number_of_Lights:
1
Position:
(-100, 100, -100)
I_light:
(0.5, 0.5, 0.5)
shading:
phong
Number_of_Objects:
1
Object name:
ball.d
scale:
(1, 1,
1)
translate:
(0, 0, 0)
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
zoom in: 60
Number_of_Lights:
1
Position:
(-100, 100, -100)
I_light:
(0.5, 0.5, 0.5)
shading:
phong
Number_of_Objects:
1
Object name:
ball.d
scale:
(1, 1,
1)
translate:
(0, 0, 0)
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
zoom in: 60
Number_of_Lights:
1
Position:
(-100, 100, -100)
I_light:
(0.5, 0.5, 0.5)
shading:
phong
Number_of_Objects:
1
Object name:
ball.d
scale:
(1, 1,
1)
translate:
(0, 0, 0)
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
|
|
|
cylinder texture sphere texture
|
Camera:
(100, 120, -100)
Reference:
(0, 0,
0)
Up:
(0, 1,
0)
d:
90
f:
110
fov:
60o
zoom in: 60
Number_of_Lights:
1
Position:
(-100, 100, -100)
I_light:
(0.5, 0.5, 0.5)
shading:
phong
Number_of_Objects:
1
Object name:
ball.d
scale:
(1, 1,
1)
translate:
(0, 0, 0)
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
|
|
|
|
©2014 - Yan Meng
|