loading...

CS602 Computer Graphics Assignment 4 Fall 2012

Question No. 1 [5]
Suppose a light ray traveling through the air intersects the surface of diamond at an angle of 50o degrees, Find at which angle this light ray will be refracted from the diamond’s surface?

Take,
Refractive Index of Diamond, n diamond = 2.4
Refractive Index of Air, n air = 1

Solution:

formula (page 291 handouts)
(n air/n diamond)* sin (Φ air) = sin (Φ diamond)
Answer= 18.614

Question No. 2 [15]
Write down the code for drawing a triangle using OpenGL and glut library function in C. Your program should keep track of following things.
Three sides of triangle should have different colors.
Your name and VUID should be displayed on window title i.e. Name (bc123456789)
Window size should be (400,400)



DOWNLOAD SOLUTION HERE
loading...