Browse papers
A

Section A: Long Answer Questions

Attempt any TWO questions.

3 questions·10 marks each
1long10 marks

What is 2D geometric transformation? Explain translation, rotation and scaling with their transformation matrices in homogeneous coordinates.

2D Geometric Transformation

A 2D geometric transformation is an operation that changes the position, size, or orientation of a graphics object in the 2D plane by modifying the coordinates of its defining points. The basic transformations are translation, rotation, and scaling.

Using homogeneous coordinates, a 2D point (x,y)(x, y) is represented as (x,y,1)(x, y, 1). This lets all transformations be expressed as 3×33\times3 matrix multiplications, so a sequence of transformations can be composed by multiplying their matrices.

1. Translation

Moves an object by distances txt_x and tyt_y:

x=x+tx,y=y+tyx' = x + t_x, \qquad y' = y + t_y [xy1]=[10tx01ty001][xy1]\begin{bmatrix} x' \\ y' \\ 1 \end{bmatrix} = \begin{bmatrix} 1 & 0 & t_x \\ 0 & 1 & t_y \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} x \\ y \\ 1 \end{bmatrix}

2. Rotation (about origin by angle θ\theta, counter-clockwise)

x=xcosθysinθ,y=xsinθ+ycosθx' = x\cos\theta - y\sin\theta, \qquad y' = x\sin\theta + y\cos\theta [xy1]=[cosθsinθ0sinθcosθ0001][xy1]\begin{bmatrix} x' \\ y' \\ 1 \end{bmatrix} = \begin{bmatrix} \cos\theta & -\sin\theta & 0 \\ \sin\theta & \cos\theta & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} x \\ y \\ 1 \end{bmatrix}

3. Scaling (about origin by factors sx,sys_x, s_y)

x=xsx,y=ysyx' = x \cdot s_x, \qquad y' = y \cdot s_y [xy1]=[sx000sy0001][xy1]\begin{bmatrix} x' \\ y' \\ 1 \end{bmatrix} = \begin{bmatrix} s_x & 0 & 0 \\ 0 & s_y & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} x \\ y \\ 1 \end{bmatrix}

If sx=sys_x = s_y scaling is uniform; otherwise it is differential. The chief advantage of homogeneous coordinates is that translation also becomes a matrix multiplication, enabling composite transformations by a single combined matrix.

transformation
2long10 marks

Explain the Cohen-Sutherland line clipping algorithm with the region codes and clip a line against a rectangular window with a suitable example.

Cohen-Sutherland Line Clipping Algorithm

This algorithm clips a line segment against a rectangular clip window with edges xmin,xmax,ymin,ymaxx_{min}, x_{max}, y_{min}, y_{max}. It assigns a 4-bit region (out) code to each endpoint indicating its position relative to the window.

Region Codes (bits: TBRL)

BitPositionSet when
1 (left)Leftx<xminx < x_{min}
2 (right)Rightx>xmaxx > x_{max}
3 (bottom)Belowy<yminy < y_{min}
4 (top)Abovey>ymaxy > y_{max}

The nine regions around the window get codes such as 0000 (inside), 0001 (left), 1000 (top), 1010 (top-right), etc.

Algorithm

  1. Compute out-codes of both endpoints P1,P2P_1, P_2.
  2. Trivially accept if both codes are 0000 (line fully inside) — draw it.
  3. Trivially reject if logical AND of the two codes 0000\neq 0000 (both endpoints share an outside region) — discard it.
  4. Otherwise, pick an endpoint that is outside, find the window edge it crosses, compute the intersection using:
    • For a vertical edge x=xex = x_e:   y=y1+m(xex1)\;y = y_1 + m(x_e - x_1)
    • For a horizontal edge y=yey = y_e:   x=x1+(yey1)/m\;x = x_1 + (y_e - y_1)/m, where m=(y2y1)/(x2x1)m = (y_2 - y_1)/(x_2 - x_1).
  5. Replace the outside endpoint with the intersection point, recompute its code, and repeat until accept or reject.

Example

Window: xmin=10, xmax=80, ymin=10, ymax=80x_{min}=10,\ x_{max}=80,\ y_{min}=10,\ y_{max}=80. Line from P1(5,5)P_1(5, 5) to P2(50,50)P_2(50, 50).

  • Code of P1(5,5)P_1(5,5): x<xminx<x_{min} and y<yminy<y_{min}0101.
  • Code of P2(50,50)P_2(50,50): inside → 0000.
  • AND = 0000 → cannot reject; P1P_1 is outside (left & bottom).
  • Slope m=(505)/(505)=1m = (50-5)/(50-5) = 1.
  • Clip against left edge x=10x=10: y=5+1(105)=10y = 5 + 1\cdot(10-5) = 10 → point (10,10)(10, 10), code 0000.
  • Now both endpoints inside → draw clipped segment from (10,10)(10,10) to (50,50)(50,50).

Thus the visible portion is the segment (10,10)(10,10)(50,50)(50,50).

clipping
3long10 marks

Explain parallel and perspective projections in 3D graphics. Derive the transformation matrix for perspective projection.

Parallel and Perspective Projections

Projection maps 3D points onto a 2D view (projection) plane along straight lines called projectors.

Parallel Projection

Projectors are parallel to each other (the center of projection is at infinity). It preserves relative proportions and parallel lines, so it is used in engineering/CAD drawings, but does not look realistic.

  • Orthographic: projectors perpendicular to the view plane (e.g. front, top, side views).
  • Oblique: projectors at an angle to the view plane (e.g. cavalier, cabinet).

Perspective Projection

All projectors converge to a single center of projection (COP) at a finite distance. Objects farther from the viewer appear smaller (foreshortening), and parallel lines meet at vanishing points. This produces realistic images (used in games, visualization).

Derivation of the Perspective Projection Matrix

Let the COP be at the origin and the view plane at z=dz = d (distance dd from the eye along +z+z). A 3D point P(x,y,z)P(x, y, z) projects to P(xp,yp,d)P'(x_p, y_p, d) on the plane.

By similar triangles (the projector from origin through PP hits the plane at z=dz=d):

xpd=xz    xp=xdz=xz/d\frac{x_p}{d} = \frac{x}{z} \;\Rightarrow\; x_p = \frac{x \cdot d}{z} = \frac{x}{z/d} ypd=yz    yp=ydz=yz/d\frac{y_p}{d} = \frac{y}{z} \;\Rightarrow\; y_p = \frac{y \cdot d}{z} = \frac{y}{z/d}

In homogeneous coordinates with the projection plane at z=dz=d, this is written as:

[xhyhzhw]=[100001000010001/d0][xyz1]=[xyzz/d]\begin{bmatrix} x_h \\ y_h \\ z_h \\ w \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 1/d & 0 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \\ 1 \end{bmatrix} = \begin{bmatrix} x \\ y \\ z \\ z/d \end{bmatrix}

The homogeneous factor is w=z/dw = z/d. Dividing by ww gives the actual coordinates:

xp=xz/d=xdz,yp=yz/d=ydzx_p = \frac{x}{z/d} = \frac{xd}{z}, \qquad y_p = \frac{y}{z/d} = \frac{yd}{z}

which matches the similar-triangles result. The non-zero entry 1/d1/d in the bottom row produces the perspective division, giving the characteristic foreshortening.

3dprojection
B

Section B: Short Answer Questions

Attempt any EIGHT questions.

9 questions·5 marks each
4short5 marks

Explain the Sutherland-Hodgman polygon clipping algorithm with an example.

Sutherland-Hodgman Polygon Clipping

This algorithm clips a polygon against a convex clipping window by clipping it successively against each window edge, one at a time. The output vertex list from clipping against one edge becomes the input for the next edge (pipeline of four clippers: left, right, bottom, top).

Rule for each edge

For every polygon edge from vertex SS to vertex PP, four cases (relative to the current clip edge) decide what is output:

  1. Both inside: output PP.
  2. SS inside, PP outside: output the intersection II.
  3. SS outside, PP inside: output II then PP.
  4. Both outside: output nothing.

Example

Clip triangle with vertices A(1,1), B(5,1), C(3,5)A(1,1),\ B(5,1),\ C(3,5) against the left edge x=2x = 2 (inside means x2x \ge 2):

  • Edge ABA\to B: A(1,1)A(1,1) outside, B(5,1)B(5,1) inside → output intersection (2,1)(2,1) and B(5,1)B(5,1).
  • Edge BCB\to C: both inside (x=5x=5 and x=3x=3) → output C(3,5)C(3,5).
  • Edge CAC\to A: C(3,5)C(3,5) inside, A(1,1)A(1,1) outside → output intersection on x=2x=2. Line CACA: at x=2x=2, y=5+(15)(13)(23)=5+2(1)=3y = 5 + \frac{(1-5)}{(1-3)}(2-3) = 5 + 2(-1) = 3 → output (2,3)(2,3).

Result after the left edge: polygon {(2,1),(5,1),(3,5),(2,3)}\{(2,1), (5,1), (3,5), (2,3)\}. This is then passed to the right, bottom and top clippers in turn.

Limitation: works correctly only for convex clip windows; clipping a concave polygon may produce extraneous connecting edges.

clippingpolygon
5short5 marks

Explain the RGB and CMY color models used in computer graphics.

RGB and CMY Colour Models

RGB Model (Additive)

  • Based on the primary colours of light: Red, Green, Blue.
  • Colours are formed by adding light: a colour is (R,G,B)(R, G, B) where each component ranges 0–1 (or 0–255).
  • (0,0,0)(0,0,0) = black, (1,1,1)(1,1,1) = white; R+GR+G = yellow, G+BG+B = cyan, R+BR+B = magenta.
  • Represented as a unit cube with black at the origin and white at the opposite corner; the diagonal is the grey scale.
  • Used by emissive devices: CRT/LCD monitors, scanners, cameras, projectors.

CMY Model (Subtractive)

  • Based on Cyan, Magenta, Yellow — the complements of RGB.
  • Colours are formed by subtracting (absorbing) light from white, suitable for reflective surfaces like printed paper.
  • (0,0,0)(0,0,0) = white (no ink), (1,1,1)(1,1,1) = black; used by printers and plotters.

Conversion

[CMY]=[111][RGB]\begin{bmatrix} C \\ M \\ Y \end{bmatrix} = \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix} - \begin{bmatrix} R \\ G \\ B \end{bmatrix}

In practice CMYK adds a separate black (K) ink because mixing C, M, Y inks rarely produces a true black.

color
6short5 marks

Write the transformation matrices for 3D translation, scaling and rotation about the x-axis.

3D Transformation Matrices (Homogeneous, 4×44\times4)

A 3D point is (x,y,z,1)(x, y, z, 1).

Translation by (tx,ty,tz)(t_x, t_y, t_z)

T=[100tx010ty001tz0001]T = \begin{bmatrix} 1 & 0 & 0 & t_x \\ 0 & 1 & 0 & t_y \\ 0 & 0 & 1 & t_z \\ 0 & 0 & 0 & 1 \end{bmatrix}

Scaling by (sx,sy,sz)(s_x, s_y, s_z) about the origin

S=[sx0000sy0000sz00001]S = \begin{bmatrix} s_x & 0 & 0 & 0 \\ 0 & s_y & 0 & 0 \\ 0 & 0 & s_z & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}

Rotation about the x-axis by angle θ\theta

The xx-coordinate is unchanged; yy and zz rotate:

Rx(θ)=[10000cosθsinθ00sinθcosθ00001]R_x(\theta) = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & \cos\theta & -\sin\theta & 0 \\ 0 & \sin\theta & \cos\theta & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}

Thus x=x,  y=ycosθzsinθ,  z=ysinθ+zcosθ.x' = x,\ \ y' = y\cos\theta - z\sin\theta,\ \ z' = y\sin\theta + z\cos\theta.

3dtransformation
7short5 marks

Explain the concept of window to viewport transformation.

Window-to-Viewport Transformation

The window is the rectangular region selected from the world-coordinate scene to be displayed; the viewport is the rectangular region of the device/screen where it is shown. The window-to-viewport transformation (also called viewing transformation) maps points from world coordinates inside the window to device coordinates inside the viewport, preserving relative position.

Let the window be [xwmin,xwmax]×[ywmin,ywmax][xw_{min}, xw_{max}] \times [yw_{min}, yw_{max}] and the viewport be [xvmin,xvmax]×[yvmin,yvmax][xv_{min}, xv_{max}] \times [yv_{min}, yv_{max}]. A window point (xw,yw)(x_w, y_w) maps to (xv,yv)(x_v, y_v) keeping the relative proportions:

xvxvminxvmaxxvmin=xwxwminxwmaxxwmin\frac{x_v - xv_{min}}{xv_{max} - xv_{min}} = \frac{x_w - xw_{min}}{xw_{max} - xw_{min}}

Solving:

xv=xvmin+(xwxwmin)sx,sx=xvmaxxvminxwmaxxwminx_v = xv_{min} + (x_w - xw_{min}) \cdot s_x, \qquad s_x = \frac{xv_{max} - xv_{min}}{xw_{max} - xw_{min}} yv=yvmin+(ywywmin)sy,sy=yvmaxyvminywmaxywminy_v = yv_{min} + (y_w - yw_{min}) \cdot s_y, \qquad s_y = \frac{yv_{max} - yv_{min}}{yw_{max} - yw_{min}}

The mapping = translate window to origin → scale by (sx,sy)(s_x, s_y)translate to viewport. If sx=sys_x = s_y the aspect ratio is preserved; otherwise the image is stretched/compressed.

windowing
8short5 marks

Differentiate between parallel projection and perspective projection.

Parallel vs Perspective Projection

FeatureParallel ProjectionPerspective Projection
Center of projectionAt infinityAt a finite distance
ProjectorsParallel to each otherConverge to the COP
Object sizeIndependent of distanceDecreases with distance (foreshortening)
Parallel linesRemain parallelConverge at vanishing points
RealismLess realisticMore realistic, life-like
Measurements/proportionsPreserved (true dimensions)Not preserved
Typical useCAD, engineering drawingsGames, visualization, art

Summary: Parallel projection keeps true shape and size, useful for technical accuracy, whereas perspective projection mimics how the human eye sees, producing realistic depth at the cost of measurable proportions.

projection
9short5 marks

Explain the working of a CRT (Cathode Ray Tube) with a suitable diagram.

Working of a CRT (Cathode Ray Tube)

A CRT is a vacuum tube that produces images by directing a beam of electrons onto a phosphor-coated screen.

Diagram (described): A sealed funnel-shaped glass vacuum tube. At the narrow end is the electron gun (heated cathode/filament, control grid, focusing and accelerating anodes). The beam then passes between vertical and horizontal deflection plates/coils, and finally strikes the phosphor-coated screen at the wide flat front.

Components and Operation

  1. Electron gun / Cathode: A heated filament heats the cathode, which emits electrons by thermionic emission.
  2. Control grid: Controls the number of electrons (hence brightness/intensity) — more negative voltage → dimmer spot.
  3. Focusing system: An electrostatic or magnetic lens converges the electrons into a fine sharp beam so it hits a small spot.
  4. Accelerating anode: A high positive voltage accelerates the beam toward the screen.
  5. Deflection system: Horizontal and vertical deflection plates (electrostatic) or coils (magnetic) bend the beam to position it anywhere on the screen.
  6. Phosphor screen: When the high-energy electrons strike the phosphor coating, it fluoresces, emitting light at that point. The glow fades quickly, so the image must be refreshed repeatedly (typically 60+ times per second) to avoid flicker. Persistence is the time the phosphor keeps glowing.

Resolution depends on spot size and the number of points (pixels) that can be displayed; aspect ratio is the width-to-height ratio of displayed points.

display-devices
10short5 marks

Differentiate between object-space and image-space methods of hidden surface removal.

Object-Space vs Image-Space Hidden Surface Removal

Hidden surface removal (visible surface detection) determines which surfaces are visible to the viewer and which are obscured. Methods are classed by the space in which the comparison is done.

AspectObject-Space MethodImage-Space Method
Where computedIn world/object coordinates on the actual geometryIn screen/device coordinates, pixel by pixel
ComparisonCompares objects/surfaces with one anotherDecides visibility at each pixel of the projection
AccuracyIndependent of resolution; results are exactDepends on display resolution
ComputationCost grows with number of objects (n2\sim n^2)Cost grows with number of pixels
ExamplesBack-face detection, Painter's (depth-sort) algorithm, BSP treesZ-buffer (depth-buffer), scan-line, area-subdivision, ray casting
Re-use on zoomMust recompute for higher precisionNaturally tied to display

Summary: Object-space methods work on the geometric description and give resolution-independent, exact results but are expensive for many objects; image-space methods resolve visibility per pixel, are simpler to implement (e.g. Z-buffer), and are limited by screen resolution.

hidden-surface
11short5 marks

What is a spline? Differentiate between interpolation and approximation splines.

Spline; Interpolation vs Approximation Splines

Spline

A spline is a smooth curve (or surface) constructed to pass through or near a set of given control points. Mathematically it is a piecewise polynomial (commonly cubic) whose pieces join with continuity (C0/C1/C2C^0/C^1/C^2) at the junction points called knots. The term comes from the flexible draftsman's strip used to draw smooth curves. Splines are widely used for designing curves and surfaces in CAD and graphics (e.g. Bézier, B-spline).

Interpolation vs Approximation Splines

Interpolation SplineApproximation Spline
The curve passes through every control point.The curve does not necessarily pass through the control points; it is only guided/attracted toward them.
Control points lie on the curve.Control points generally lie off the curve (only define its shape).
Useful for digitizing/fitting a known path of points.Useful for free-form design where the designer shapes the curve.
Example: natural cubic spline, Catmull-Rom.Example: Bézier curve, B-spline.

When a curve is to fit existing data points exactly, an interpolation spline is chosen; when the control points are used merely to shape the curve, an approximation spline is used.

curvesspline
12short5 marks

Explain the key frame system in computer animation.

Key Frame System in Computer Animation

A key frame is a frame that records a complete description of the scene at an important point in an animation sequence. In a key frame system, the animator specifies only these key frames at selected times, and the system automatically generates the in-between frames (tweens).

Working

  1. The animator defines key frames at critical instants (e.g. start, extreme positions, end of a motion).
  2. The intermediate frames are produced by in-betweening (tweening) — interpolating object attributes (position, shape, color, size) between successive key frames.
  3. Linear interpolation gives uniform motion; non-linear interpolation (e.g. ease-in/ease-out using spline interpolation) gives natural acceleration and deceleration.

Interpolation example

For an object at position P1P_1 in key frame at time t1t_1 and P2P_2 at t2t_2, an in-between frame at time tt is:

P(t)=P1+(P2P1)tt1t2t1P(t) = P_1 + (P_2 - P_1)\cdot\frac{t - t_1}{t_2 - t_1}

Advantages

  • The animator only draws/specifies a few key poses, saving effort.
  • Smooth, controllable motion; consistent timing.
  • Used in cel-style, 2D and 3D character animation.

Morphing (shape transformation between two key frames) is a related technique when the key objects have different shapes/number of vertices.

animation

Frequently asked questions

Where can I find the BSc CSIT (TU) Computer Graphics (BSc CSIT, CSC209) question paper 2080?
The full BSc CSIT (TU) Computer Graphics (BSc CSIT, CSC209) 2080 (regular) question paper is available free on Kekkei. You can read every question online and attempt the paper under timed exam conditions.
Does the Computer Graphics (BSc CSIT, CSC209) 2080 paper come with solutions?
Yes. Every question on this Computer Graphics (BSc CSIT, CSC209) past paper includes a step-by-step solution, plus instant AI feedback when you attempt it on Kekkei.
How many marks is the BSc CSIT (TU) Computer Graphics (BSc CSIT, CSC209) 2080 paper?
The BSc CSIT (TU) Computer Graphics (BSc CSIT, CSC209) 2080 paper carries 60 full marks and is meant to be completed in 180 minutes, across 12 questions.
Is practising this Computer Graphics (BSc CSIT, CSC209) past paper free?
Yes — reading and attempting this Computer Graphics (BSc CSIT, CSC209) past paper on Kekkei is completely free.