2079

BIT304 · TU past paper

Computer Graphics 2079 question paper

The complete TU 2079 exam paper for Computer Graphics (BIT304), all 12 questions with solved model answers written to the mark scheme.

Past Papers2082208120802079

Tap a question to open its answer.

  1. 110 marksNumericalBresenham's line drawing algorithmAnswer

    List the major differences between DDA and Bresenham's algorithm. Illustrate the Bresenham's algorithm to the line with end points(10, 6) and (12, 1).[10]

    DDA vs Bresenham's Algorithm & Numerical Illustration

    STEP 1 - Given Data

    • Endpoint 1: $(x_1, y_1) = (10, 6)$
    • Endpoint 2: $(x_2, y_2) = (12, 1)$

    Major Differences between DDA and Bresenham's Algorithm

    FeatureDDA AlgorithmBresenham's Algorithm
    ComputationUses floating-point arithmeticUses only integer arithmetic
    SpeedSlower (floating-point operations)Faster (integer operations)
    RoundingRequires rounding each stepNo rounding needed
    AccuracyLess accurate (rounding errors)More accurate
    OperationsMultiplication and divisionOnly addition and subtraction
    Decision ParameterNone usedUses decision parameter $p_k$
    EfficiencyLess efficientMore efficient
    HardwareDifficult to implementEasy to implement

    STEP 2 - Bresenham's Line: (10, 6) to (12, 1)

    Calculate parameters

    $$dx = x_2 - x_1 = 12 - 10 = 2$$ $$dy = y_2 - y_1 = 1 - 6 = -5$$ $$|dx| = 2, \quad |dy| = 5$$

    Since $|dy| > |dx|$, the line is steep ($|m| > 1$). Drive the algorithm along the y-axis. Here $y$ decreases (6 → 1) so $y$ steps by $-1$; $x$ increases since $x_2 > x_1$.

    Initialize decision parameter

    $$p_0 = 2|dx| - |dy| = 2(2) - 5 = -1$$

    Constants: $$2|dx| = 4, \qquad 2|dx| - 2|dy| = 4 - 10 = -6$$

    Decision rule (steep line, y-axis driven)

    • If $p_k < 0$: next point $(x_k,\ y_k - 1)$, and $p_{k+1} = p_k + 2|dx|$
    • If $p_k \ge 0$: next point $(x_k + 1,\ y_k - 1)$, and $p_{k+1} = p_k + 2|dx| - 2|dy|$

    Iteration Table

    Step $k$$p_k$ConditionPoint $(x, y)$$p_{k+1}$
    0-1$p_0 < 0$(10, 6)$-1 + 4 = 3$
    13$p_1 \ge 0$(11, 5)$3 - 6 = -3$
    2-3$p_2 < 0$(11, 4)$-3 + 4 = 1$
    31$p_3 \ge 0$(12, 3)$1 - 6 = -5$
    4-5$p_4 < 0$(12, 2)$-5 + 4 = -1$
    5--(12, 1)-

    Final Plotted Pixels

    $$(10, 6) \to (11, 5) \to (11, 4) \to (12, 3) \to (12, 2) \to (12, 1)$$

    Conclusion

    Bresenham's algorithm avoids floating-point arithmetic, using only integer addition/subtraction and a decision parameter, making it faster, more accurate, and easier to implement in hardware than DDA.

  2. 210 marksNumericalDecision parameters for circle generationAnswer

    How decision parameter can be used to draw circle? Calculate the points to draw a circle having radius 5 and center as (10, 5).[10]

    • Radius $r = 5$ - Center $(xc, yc) = (10, 5)$ The Midpoint Circle Algorithm uses a decision parameter to choose between two candidate pixels while scanning one octant, avoiding floating-point square roots. For a circle centered at origi...
  3. 310 marksVector graphics display architectureAnswer

    Draw the block diagram of vector and raster graphics display architecture and write the advantages and disadvantage of both display architecture.[10]

    --- Advantages: - Realistic images: Can display photorealistic images with smooth color gradations - Efficient rendering: Fast display using frame buffer and hardware acceleration - Natural for photography: Well-suited for digitized imag...

  4. 45 marksApplications of computer graphicsAnswer

    Discuss the use of computer graphics in different areas. [5]

    Computer graphics has become an essential tool across numerous fields. Here are the major application areas: - Film and Animation: Creation of animated movies, visual effects (VFX), and 3D cinematography - Gaming: Development of video ga...

  5. 55 marksPolygon definition and propertiesAnswer

    Describe polygon, vertex and edge table of a polygon. [5]

    A polygon is a closed planar figure formed by a finite sequence of straight line segments (edges) that connect a set of points (vertices). Key characteristics: - Consists of vertices (corner points) and edges (line segments connecting ve...

  6. 65 marksBoundary representation techniqueAnswer

    What is boundary representation technique? Explain. [5]

    Boundary representation (B-rep) is a solid modeling technique that represents a 3D object by explicitly defining its surface boundaries. Instead of describing the interior volume of an object, B-rep focuses on the geometric and topologic...

  7. 75 marksPhong illumination modelAnswer

    Explain the Phong illumination model for specular reflection. [5]

    The Phong illumination model is a widely-used empirical model in computer graphics that calculates the intensity of light reflected from a surface by combining three components: ambient, diffuse, and specular reflection. For specular ref...

  8. 85 marksShearing transformationAnswer

    Write short notes on: a. Shearing and Scaling b. Line Clipping [5]

    Scaling is a transformation that changes the size of an object by multiplying coordinates by scale factors. Transformation equations: - x' = sx · x - y' = sy · y Where sx and sy are scale factors for x and y directions respectively. Matr...

  9. 95 marksLine method for visible surface detectionAnswer

    Explain how can line method detects the visible surface with example. [5]

    The line method (also called the scan-line algorithm) is a visible surface detection technique that processes the scene line by line (usually horizontally across the screen) to determine which surfaces are visible at each pixel position....

  10. 105 marksPhong shading algorithm and procedureAnswer

    Differentiate Phong Shading with Gouraud Shading method. [5]

    Aspect Gouraud Shading Phong Shading ---------------------------------------- Normal Calculation Normals computed at vertices only Normals computed at each pixel/fragment Intensity Calculation Intensity calculated at vertices, then inter...

  11. 115 marksCohen-Sutherland line clipping algorithmAnswer

    Explain Cohen-Sutherland line clipping Algorithm. [5]

    The Cohen-Sutherland algorithm is a line clipping algorithm used to determine which portions of a line lie within a rectangular clipping window and should be displayed. It efficiently clips lines by dividing the plane into regions and us...

  12. 125 marksBezier curves and propertiesAnswer

    What is Bezier curve? Describe its properties. [5]

    Bezier Curve: Definition and Properties

    Definition

    A Bezier curve is a parametric curve used in computer graphics and design to represent smooth curves. It is defined by a set of control points and is generated using the Bernstein polynomial basis functions. The curve passes through the first and last control points but is influenced by the intermediate control points, which act as "handles" to shape the curve.

    A Bezier curve of degree n is mathematically defined as:

    B(t) = Σ(i=0 to n) P_i * B_i,n(t), where 0 ≤ t ≤ 1

    where:

    • P_i are the control points
    • B_i,n(t) are Bernstein basis functions: B_i,n(t) = C(n,i) * t^i * (1-t)^(n-i)
    • C(n,i) is the binomial coefficient

    Properties of Bezier Curves

    1. Passes Through End Points

    The curve always passes through the first control point P_0 and the last control point P_n. Intermediate control points influence but do not necessarily lie on the curve.

    2. Convex Hull Property

    The entire curve lies within the convex hull formed by its control points. This ensures the curve remains bounded and predictable.

    3. Continuity

    Bezier curves are infinitely differentiable (smooth) everywhere along their length, providing C-infinity continuity.

    4. Affine Invariance

    The curve is invariant under affine transformations. Transforming the control points and then generating the curve produces the same result as generating the curve first and then transforming it.

    5. Symmetry

    Reversing the order of control points produces the same curve traversed in the opposite direction.

    6. Variation Diminishing Property

    The curve does not oscillate about any line more than the control polygon does, making it stable and predictable.

    7. Scalability

    Bezier curves can represent curves of any degree by adjusting the number of control points.


    These properties make Bezier curves ideal for interactive design applications, font rendering, and animation in computer graphics.