Semester
Subject
Year
Tribhuwan University
2080
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
Polygon clipping is the process of removing portions of a polygon that lie outside a specified clipping window, while retaining and correctly connecting the portions that lie inside.
Sutherland-Hodgman Algorithm is the most common method for polygon clipping. It clips a polygon against each edge of the clipping window one at a time.
Working Principle:
The polygon (as a list of vertices) is clipped against each of the four boundaries (left, right, top, bottom) in sequence. For each boundary, the algorithm processes every edge of the polygon and produces a new list of vertices.
Four Cases for Each Edge (vertex to vertex $P$):
Diagram Description: Imagine a rectangular clipping window with a polygon partially inside and partially outside. The algorithm clips the polygon edge-by-edge against each window boundary, producing a new clipped polygon that fits entirely within the window.
Gouraud Shading (also called intensity interpolation shading) is a polygon shading technique that calculates illumination at each vertex and then linearly interpolates the intensity values across the polygon surface.
Purpose: To eliminate intensity discontinuities at polygon boundaries and produce a smooth appearance for curved surfaces approximated by polygon meshes.
Steps in Gouraud Shading:
Derivation:
Step 1: Computing Vertex Normal
The normal at vertex is the average of normals of all polygons sharing that vertex:
where are the normals of the polygons sharing vertex .
Step 2: Intensity at Each Vertex
Using any illumination model (e.g., Phong illumination):
This gives intensity values , , at vertices of a triangle.
Step 3: Interpolation Along Edges
For a scan line at position , interpolate intensity along left and right edges:
where and are intensities at the left and right intersection points of the scan line with the polygon edges.
Step 4: Interpolation Along Scan Line
For a pixel at position on the scan line:
where and are the x-coordinates of left and right edge intersections.
Advantages:
Limitations:
Conclusion: Polygon clipping using Sutherland-Hodgman algorithm systematically clips against each window boundary. Gouraud shading provides smooth intensity variation across polygon meshes by interpolating vertex intensities, making it a widely used real-time rendering technique.
Short Answers Questions