HW3
Goal
- Draw a sphere and apply Phong shading or Gouraud shading on it.
- Use keyboard to control the lighting parameters.
*Use GLSL to do this homework, otherwise youll get zero points.
Spec
Camera:
Position: (0, 0, 5.6) Center: (0, 0, 0)
Up vector: (0, 1, 0)
Sphere:
Slice: 20
Stack: 10
Radius: 1
Spec
Point light source : (draw a small sphere to represent the light source)
Position : (1.1, 1.0 , 1.3)
The color of the sphere : (0.4, 0.5, 0.0)
The radius of the sphere : 0.05
Keyboard control :
1 : The parameter Ks decreases from 1 to 0 (Ks -= 0.1)
2 : The parameter Ks increases from 0 to 1 (Ks += 0.1)
3 : The parameter Kd decreases from 1 to 0 (Kd -= 0.1)
4 : The parameter Kd increases from 0 to 1 (Kd += 0.1)
Spec
Phong Shading :
Ks = 0 (initial value)
Kd = 0 (initial value) Ka = 0.5 alpha = 3.6 la = (0.2, 0.2, 0.2) ld = (0.5, 0.5, 0.5) ls = (0.8, 0.8, 0.8)
Score
1. Successfully draw a sphere and apply Gouraud shading on it. (70%)
2. Switch to Phong shading (Use keyboard B). (10%)
3. Use keyboard to control the Kd and Ks parameters. (10%)
4. Demo (10%)
(We will ask you some questions about this homework)
5. Bonus : (10%)
(1).Change to tone mapping (5%) (Use keyboard B)
(Set the threshold to map the color into 4 Intensity levels.)
(2).Add border enhancement (5%)
(Use keyboard E to enable and disable the border)
Example video
Phong shading Phong shadingGouraud shadingTone mapping
Control Kd and Ks Border enhancement
Others
- You can do this homework based on your HW2.
- Zip your Visual Studio project into StudentID_HW3.zip , and upload it to New e3.
- The deadline is at 11:55 pm on December 23.
- If you submit your homework late, the score will be discounted. submit between (12/24 12/30) : Your final score * 0.9 submit between (12/31 1/6) : Your final score * 0.8 submit between (1/6~1/10) : Your final score * 0.7

![[Solved] IGC Homework3- Draw a sphere and apply Phong shading or Gouraud shading](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip.jpg)

![[Solved] IGC Homework1-Draw three solid sphere: Sun, Earth, Moon](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip-1200x1200.jpg)
Reviews
There are no reviews yet.