IGC Homework3- Draw a sphere and apply Phong shading or Gouraud shading Solved

35.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

5/5 - (1 vote)

HW3

Goal

  1. Draw a sphere and apply Phong shading or Gouraud shading on it.
  2. Use keyboard to control the lighting parameters.

*Use GLSL to do this homework, otherwise you’ll 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

  1. You can do this homework based on your HW2.
  2. Zip your Visual Studio project into “ StudentID_HW3.zip” , and upload it to New e3.
  3. The deadline is at 11:55 pm on December 23.
  4. 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
  • hw3-cfifop.zip