Semester
Subject
Year
Tribhuwan University
Model
Bachelor Level / Third Year / Fifth Semester / Science
(Computer Graphics)
Full Marks: 60
Pass Marks: 24
Time: 3 Hours
Candidates are required to give their answers in their own words as for as practicable.
The figures in the margin indicate full marks.
Long Answers Questions
| Parameter | Ambient Light | Diffuse Reflection |
|---|---|---|
| Definition | Constant background illumination that uniformly lights all surfaces regardless of position or orientation | Light reflected equally in all directions from a surface based on the angle of incoming light |
| Direction Dependency | Independent of light source direction and viewer position | Depends on the angle between light source direction and surface normal |
| Formula | ||
| Surface Normal | Not required for computation | Required to calculate the angle of incidence |
| Appearance | Produces flat, uniform illumination with no shading variation | Produces shading that varies across the surface based on orientation |
| Realism | Low — no depth perception | Moderate — gives sense of 3D shape |
| Light Source | Simulates indirect/scattered light in environment | Simulates direct light hitting a rough/matte surface |
| Shadow Effect | No shadows produced | Surfaces facing away from light appear darker |
| Example | Light in a room with no visible source | A chalk piece or matte wall under a bulb |
Phong Shading is an interpolation method where the surface normal is interpolated across the polygon, and the illumination model is applied at each pixel to produce smooth, realistic highlights.
Steps of the Algorithm:
Step a: For each polygon, compute the normal vectors at each vertex ($\hat{N}_1, \hat{N}_2, \hat{N}_3$) using the average of normals of adjacent polygons.
Step b: For each scan line that intersects the polygon, determine the boundary edges (left and right intersection points).
Step c: Interpolate normals along polygon edges — For each edge, linearly interpolate the vertex normals to get the normal at each edge intersection point on the scan line:
Step e: Normalize the interpolated normal at each pixel:
Step f: Apply the Phong illumination model at each pixel using the interpolated normal:
Where:
= ambient, diffuse, specular reflection coefficients
= reflection vector
= viewer direction vector
= shininess exponent
Step g: Assign the computed intensity value to the pixel and move to the next pixel.
Step h: Repeat for all scan lines until the entire polygon is rendered.
Advantages of Phong Shading:
Disadvantage:
Conclusion: Ambient light provides basic uniform visibility while diffuse reflection adds depth based on surface orientation. Phong Shading combines both along with specular reflection at every pixel to produce the most realistic rendering among polygon shading methods.
Short Answers Questions