2077

CSC214 · TU past paper

Computer Graphics 2077 question paper

The complete TU 2077 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.

  1. 110 marksNumericalScan Converting a Point and a straight LinAnswer

    List the major differences between DDA and Bradenham’s Line drawing algorithm. Illustrate the DDA algorithm to the line width end points (2, 2) and (9, 2).[10]

    --- - Algorithm comparison: DDA vs Bresenham's (question spells it "Bradenham's" and "width" is a typo for "with") - Line end points: - Start: $(x1, y1) = (2, 2)$ - End: $(x2, y2) = (9, 2)$ All data present. Proceeding. --- Basis DDA Alg...

  2. 210 marksPolygon SurfaceAnswer

    How polygon table is used in representing polygons? Explain the representations of any three curves.[10]

    Polygon Table in Representing Polygons and Curve Representations


    Part 1: Polygon Table for Representing Polygons

    Polygon Surfaces

    The most commonly used boundary representation (B-rep) for a 3D graphics object is a set of surface polygons that enclose the interior of the object. Many graphics systems store all object descriptions as a set of surface polygons because it simplifies and speeds up surface rendering and display.

    Polygon Tables

    A polygon table is the specification of polygon surfaces using vertex coordinates and other attributes. Polygon data tables are organized into two groups:

    1. Geometric Tables
    2. Attribute Tables

    Geometric Tables

    For storing geometric data, three lists are created:

    1. Vertex Table

    • Stores the coordinate values (x, y, z) for each vertex in the object.
    • Example:
    Vertexxyz
    V1x1y1z1
    V2x2y2z2
    V3x3y3z3
    ............

    2. Edge Table

    • Contains pointers back into the vertex table to identify the two vertices for each polygon edge.
    • Example:
    EdgeVertex Pointers
    E1V1, V2
    E2V2, V3
    E3V3, V1
    ......

    3. Polygon Table

    • Contains pointers back into the edge table to identify the edges that form each polygon.
    • Example:
    PolygonEdge Pointers
    P1E1, E2, E3
    P2E3, E4, E5
    ......

    Attribute Table

    • Contains qualitative properties of each polygon surface such as:
      • Degree of transparency
      • Surface reflectivity
      • Color and texture information

    Diagram of Polygon Table Structure

    Vertex Table        Edge Table          Polygon Table
    -----------         ----------          -------------
    V1: (x1,y1,z1) <-- E1: V1,V2  <------ P1: E1,E2,E3
    V2: (x2,y2,z2) <-- E2: V2,V3          P2: E3,E4,E5
    V3: (x3,y3,z3) <-- E3: V3,V1
    

    This hierarchical pointer structure allows efficient storage and retrieval of polygon geometry for rendering.


    Part 2: Representations of Three Curves


    1. Spline Curves

    Definition: A spline refers to a flexible strip used to produce a smooth curve through a designated set of points. Mathematically, a spline curve is described using a piecewise cubic polynomial function.

    Key Concepts:

    • Several small weights are distributed along the length of the strip to hold it in position on a drafting table as the curve is drawn.
    • The curve passes through or near a set of control points.
    • A spline surface can be described with two sets of orthogonal spline curves.

    Mathematical Representation: A piecewise cubic polynomial for a segment between two control points is:

    P(t) = a*t³ + b*t² + c*t + d,   0 ≤ t ≤ 1
    

    where a, b, c, d are coefficient vectors determined by boundary conditions.

    Applications:

    • Designing curve and surface shapes in graphics applications.
    • Used in CAD/CAM, animation, and font design.

    Diagram:

    Control Points: P0, P1, P2, P3
             P1 *       * P2
               /         \
         P0 *               * P3
             \_____________/
               Spline Curve
    

    2. Bezier Curves

    Definition: A Bezier curve is a parametric curve defined by a set of control points. The curve is influenced by all control points but generally does not pass through the intermediate ones (only through the first and last).

    Mathematical Representation: For n+1 control points P0, P1, ..., Pn, the Bezier curve is:

    P(t) = Σ [C(n,k) * t^k * (1-t)^(n-k) * Pk],   0 ≤ t ≤ 1
           k=0 to n
    

    where C(n,k) = n! / (k! * (n-k)!) are the Bernstein basis polynomials.

    For a cubic Bezier curve (n=3):

    P(t) = (1-t)³P0 + 3t(1-t)²P1 + 3t²(1-t)P2 + t³P3
    

    Properties:

    • The curve always passes through P0 and P3 (endpoints).
    • The curve lies within the convex hull of the control points.
    • Changing one control point affects the entire curve.

    Diagram:

        P1 *----* P2
          /        \
    P0 *            * P3
        \__Bezier__/
    

    3. B-Spline Curves

    Definition: A B-Spline (Basis Spline) curve is an extension of the Bezier curve that provides local control over the shape of the curve. Changing one control point affects only a portion of the curve.

    Mathematical Representation:

    P(t) = Σ Pi * Ni,k(t)
           i=0 to n
    

    where:

    • Pi are the control points
    • Ni,k(t) are the B-Spline basis functions of order k
    • The basis functions are defined recursively:
    Ni,1(t) = 1,  if ti ≤ t < ti+1,   else 0
    
    Ni,k(t) = [(t - ti) / (ti+k-1 - ti)] * Ni,k-1(t) + [(ti+k - t) / (ti+k - ti+1)] * Ni+1,k-1(t)
    

    where $t_0, t_1, \ldots, t_{n+k}$ is the sequence of knot values that determines where and how the control points influence the curve.

    Properties:

    • Provides local control: moving one control point only changes the curve over a limited parameter range (roughly $k$ segments), unlike a Bezier curve where every control point affects the entire curve.
    • The degree of the curve (order $k$) is independent of the number of control points, unlike a Bezier curve where the degree is always one less than the number of control points.
    • Includes Bezier curves as a special case (a B-Spline with a single knot span and no interior knots reduces to a Bezier curve).
    • Widely used in CAD systems and font outlines where localized editing of a complex curve is needed.

    Diagram:

         P1 *        * P3
           /  \    /  \
     P0 *      \  /      * P4
          \_____\/______/
       (each control point only reshapes a local segment)
    

    Summary

    Together, the polygon table (vertex, edge, polygon and attribute lists) gives an efficient boundary representation for flat-faced 3D objects, while spline, Bezier, and B-Spline curves give three progressively more flexible ways to represent smooth curved surfaces: splines interpolate through control points with piecewise cubics, Bezier curves give a single polynomial influenced by every control point globally, and B-Splines add local control through their knot-based recursive basis functions, which is why B-Splines are preferred whenever a designer needs to edit part of a complex curve without disturbing the rest of it.

  3. 310 marksPolygon Rendering MethodsAnswer

    Define realism in human perception. What is the significance difference between rendering and image synthesis in creating computer generated 3D image? Describe any two polygon rendering methods.[10]

    --- Realism in human perception refers to the ability of a computer-generated image to appear as close to the real world as possible, so that the human visual system perceives it as natural and believable. In computer graphics, realism i...

  4. 45 marksGraphics HardwareAnswer

    Differentiate between vector and raster graphics. [5]

    Vector Graphics: Vector displays generate images by directing the electron beam only to the specific parts of the screen where the picture is to be drawn. The picture definition is stored as a set of line-drawing commands (specified by e...

  5. 55 marksNumericalTwo-Dimensional translation, Rotation, ScaAnswer

    Translate a triangle ABC with co-ordinates A(0, 0), B(5, 0) and C(5, 5) by 2 units in x-direction and 3 units in y-directions. [5]

    • Triangle vertices: $A(0, 0)$, $B(5, 0)$, $C(5, 5)$ - Translation: $tx = 2$ (x-direction), $ty = 3$ (y-direction) Translation formula: $$x' = x + tx, \qquad y' = y + ty$$ Homogeneous translation matrix: $$T = \begin{bmatrix} 1 & 0 & 2 ...
  6. 65 marksThree-Dimensional ViewingAnswer

    Differentiate between orthographies, parallel, and perspective projections. [5]

    Projection is the process of mapping a 3D object onto a 2D plane (view plane). The two major types are Parallel Projection and Perspective Projection. Orthographic projection is a subtype of parallel projection. --- - In parallel project...

  7. 75 marksBinary Space Partition TreesAnswer

    Describe how a polygon can be represented using BSP tree with example. [5]

    A Binary Space Partitioning (BSP) tree is a data structure used to recursively subdivide a space (containing 2D polygons or 3D scenes) into two half-spaces -- FRONT and BACK -- with respect to a selected dividing plane (or line in 2D). T...

  8. 85 marksBSP tree Method, Octree and Ray TracingAnswer

    What is the role of ray tracing in visible surface detection? Explain How scan line algorithm is used for back face detection. [5]

    --- Ray tracing is an image-space method for visible surface detection. The basic idea is to trace the path of light rays from the viewer's eye (or camera) through each pixel on the projection plane into the scene. 1. For each pixel on t...

  9. 95 marksIntroduction, Callback functions, Color coAnswer

    Write a procedure to draw a line in OpenGL? Describe Painter’s algorithm. [5]

    --- In OpenGL, the term line refers to a line segment. Lines are specified in terms of the vertices at their endpoints. OpenGL also supports connected series of line segments and closed connected series of segments. Primitive Description...

  10. 105 marksNumericalClippingAnswer

    Let ABCD be the rectangle window with A(0, 0), B(10, 0), C(10, 10) and D(0, 10). Use Liang Barsky line clipping algorithm to clip the line XY where X(5, 3) and Y(15, 9). [5]

    • Rectangle window: A(0,0), B(10,0), C(10,10), D(0,10) - $x{min}=0,\ x{max}=10,\ y{min}=0,\ y{max}=10$ - Line XY: $X(5,3)$, $Y(15,9)$ - $x1=5,\ y1=3,\ x2=15,\ y2=9$ --- $$\Delta x = x2 - x1 = 15 - 5 = 10$$ $$\Delta y = y2 - y1 = 9 - 3 = ...
  11. 115 marksBlobby ObjectsAnswer

    Define blobby objects. Describe about basic illumination models. [5]

    --- Blobby objects are objects that do not maintain a fixed shape but change their surface characteristics during certain motions or interactions. Examples: - Molecular structures - Water droplets - Melting objects - Muscle tissue deform...

  12. 125 marksVirtual Reality Components of VR System, TAnswer

    How virtual realities differ with our real world? Describe some components of VR system. [5]

    Virtual Reality is an artificial environment created with software and presented to the user in such a way that the user suspends belief and accepts it as a real environment. It is the use of computer technology to create a simulated, in...