CSC214 · TU past paper
Computer Graphics 2075 question paper
The complete TU 2075 exam paper for Computer Graphics (CSC214), all 12 questions with solved model answers written to the mark scheme.
Tap a question to open its answer.
- Q1.10 marksNumericalClippingHideAnswer
Define window, viewport and viewing transformation. Let ABCD be the regular window with A(20, 20), B(90, 20), C(90, 70), and D(20, 70). Find the region codes for end points and use Cohen Sutherland algorithm to clip the lines P(10, 30) Q(80, 90).[10]
Window, Viewport, Viewing Transformation and Cohen-Sutherland Clipping
Part 1: Definitions
Window: A rectangular region defined in the world coordinate system that selects the portion of a scene to be displayed. Only objects lying inside the window are shown.
Viewport: A rectangular region on the display device (screen, in device/normalized coordinates) onto which the contents of the window are mapped.
Viewing Transformation: The mapping of the contents of a window in world coordinates to a viewport on the display device, also called the window-to-viewport transformation. Composite form:
$$T_{wv} = T(xv_{min}, yv_{min}) \cdot S(S_x, S_y) \cdot T(-xw_{min}, -yw_{min})$$
$$S_x = \frac{xv_{max}-xv_{min}}{xw_{max}-xw_{min}}, \qquad S_y = \frac{yv_{max}-yv_{min}}{yw_{max}-yw_{min}}$$
csc214-window-viewport
Part 2: Cohen-Sutherland Line Clipping
Given Data
Window ABCD: A(20,20), B(90,20), C(90,70), D(20,70)
$$x_{min}=20,\quad x_{max}=90,\quad y_{min}=20,\quad y_{max}=70$$
Line: $P(10,30)$ to $Q(80,90)$
Region Code (Top | Bottom | Right | Left)
P(10, 30):
- Top: $30>70$? No → 0
- Bottom: $30<20$? No → 0
- Right: $10>90$? No → 0
- Left: $10<20$? Yes → 1
$$\text{Code}(P) = 0001$$
Q(80, 90):
- Top: $90>70$? Yes → 1
- Bottom: $90<20$? No → 0
- Right: $80>90$? No → 0
- Left: $80<20$? No → 0
$$\text{Code}(Q) = 1000$$
Trivial Tests
- AND: $0001 \text{ AND } 1000 = 0000$ → not trivially rejected
- OR: $0001 \text{ OR } 1000 = 1001 \ne 0000$ → not trivially accepted
Line must be clipped. Slope quantities: $$\Delta x = 80-10 = 70, \qquad \Delta y = 90-30 = 60$$ $$m = \frac{\Delta y}{\Delta x} = \frac{60}{70} = \frac{6}{7}$$
Clip Point P (code 0001, Left boundary x = 20)
$$y = y_1 + m(x_{min}-x_1) = 30 + \frac{6}{7}(20-10) = 30 + \frac{60}{7} = 38.57$$
New point $P' = (20, 38.57)$
Code of $P'(20, 38.57)$: Top no, Bottom no, Right no, Left ($20<20$? no) → 0000 (inside)
Clip Point Q (code 1000, Top boundary y = 70)
$$x = x_1 + \frac{1}{m}(y_{max}-y_1) = 10 + \frac{7}{6}(70-30) = 10 + \frac{7}{6}\times 40$$ $$x = 10 + 46.67 = 56.67$$
New point $Q' = (56.67, 70)$
Code of $Q'(56.67, 70)$: Top ($70>70$? no) → 0, Bottom no, Right ($56.67>90$? no) → 0, Left no → 0000 (inside)
Final Result
Both endpoints now have code 0000 → line accepted.
$$\boxed{\text{Clipped line: } P'(20,\ 38.57) \text{ to } Q'(56.67,\ 70)}$$
The complete result requires clipping $Q$ as well, giving $Q'(56.67, 70)$.
- Q2.10 marksBSP tree Method, Octree and Ray TracingHideAnswer
List any two disadvantages of BSP tree method in visible surface detection. Make a comparison between Painter’s algorithm and A-Buffer algorithm.[10]
- Q3.10 marksSweep, Boundary and Spatial-Partitioning RHideAnswer
Describe the architecture of raster scan display. Explain about sweep, octree and boundary representations for solid modeling.[10]
- Q4.5 marksIntroduction, Callback functions, Color coHideAnswer
Give some basic color model. Give the basic command to draw the pixel and polygon in OpenGL. [5]
- Q5.5 marksNumericalScan Converting a Point and a straight LinHideAnswer
Trace the Bresenham’s Line drawing algorithm for the end points(1, 1) and (8, 5). [5]
- Q6.5 marksThree-Dimensional translation, Rotation, SHideAnswer
Derive the relation for three-dimensional translation and rotation. [5]
- Q7.5 marksWireframe RepresentationHideAnswer
What is the purpose of wireframe representation? Describe about boundary and space partitioning. [5]
- Q8.5 marksNumericalScan Converting Circle and EllipseHideAnswer
Plot the ellipse centered at (0, 0) with radius rx = 8 and ry = 6, using mid point ellipse drawing algorithm. [5]
- Q9.5 marksClippingHideAnswer
Define clipping. Discuss about cubic spline Interpolation. [5]
- Q10.5 marksIntensity attenuation and Color consideratHideAnswer
How can we detect shadows in computer graphics? List the challenged in computing light model. [5]
- Q11.5 marksRepresenting CurvesHideAnswer
Mention any two color command in OpenGL. Explain about Hermite curve. [5]
- Q12.5 marksApplication of VRHideAnswer
List some applications of VR. What might be the possible navigation techniques and manipulating interfaces in virtual reality? Justify. [5]