Interactive Computer Graphics HW2
R96944043 ©P§B¬Û
http://www.cmlab.csie.ntu.edu.tw/~zho/
Homework #2 Shading
Requirements
- Load a 3D model file of TRI format.
- Use flat shading
- Use Gouraud shading
- Implement Phong shading
Bonus
Program brief
- Stand-alone executable program created & compiled by visual c++ 2005, R96944043_HW2.exe with library zlCore, zlGLRDev , zlUI, zlCollide
- Using opengl for graphic, simply set opengl flag to draw flat shading and Gouraud shading.
- Realize Phong shading by GPU with GLSL.
- Drag tri file from explorer.exe into window of program to change model.
- Key 1: Use 1 light
- Key 2: Use 2 lights
- Key 3: Use 3 lights
- The main control panel will slide in when move mouse cursor to right of the program window.
Result

flat shading

Gouraud shading
Phong shading

Easter.tri, Phong shading, 3 lights

Mig27.tri, Phong shading, 3 lights