Important Questions

BIT304 · Exam intelligence

Computer Graphics important questions

From 5 past TU papers: which questions keep coming back, how much they carry, and what is most likely to show up next. Every question links to a model answer.

Most likely in the next examStatistical

Ranked by how often a topic is asked, its marks weight, and whether it is due after skipping the 2082 paper. No guarantees; study the whole syllabus.

1asked 3xavg 8 marks · due (skipped 2082) · Bresenham's line drawing algorithm

Write the algorithm for Bresenham's line drawing? Digitize a line with end points A(6, 9) and B(10,5) using Bresenham's line drawing algorithm.[10]

Answer
  • Endpoint A: $(x1, y1) = (6, 9)$ - Endpoint B: $(x2, y2) = (10, 5)$ 1. Input the two endpoints $(x1, y1)$ and $(x2, y2)$. 2. Compute $\Delta x = x2 - x1$ and $\Delta y = y2 - y1$. 3. Plot the first point $(x1, y1)$. 4. Calculate the initial decision parameter: $$p0 = 2\Delta y - \Delta x$$ 5. At...
2asked 3xavg 7 marks · due (skipped 2082) · Phong shading algorithm and procedure

Write procedure to render the polygon surface by using Phong shading model. [5]

Answer

Phong shading is an interpolation-based shading technique that calculates surface color at each pixel by interpolating normal vectors across the polygon surface and applying the Phong illumination model at each point. - Compute the surface normal at each vertex of the polygon - For a polygon with...

3asked 2xavg 8 marks · due (skipped 2082) · Parallel projection

Differentiate between parallel and perspective projection. Perform the rotation of triangle with vertices A(5,7), B(12,85) and C(5,3) counterclockwise 30 degree about the pivot point (5,3).[10]

Answer

Model Answer: Parallel vs Perspective Projection and Triangle Rotation

Part 1: Parallel vs Perspective Projection

AspectParallel ProjectionPerspective Projection
ProjectorsProjection lines (projectors) are parallel to each otherProjectors converge to a single point (center of projection)
Center of projectionAt infinityAt a finite distance
Vanishing pointNone; parallel lines remain parallelOne or more vanishing points; parallel lines converge
Depth realismDoes not depict realistic depth; size independent of distanceRealistic depth; distant objects appear smaller (foreshortening)
Scale/proportionTrue dimensions and proportions preservedScale varies with distance from viewpoint
MathematicsSimpler (orthographic/oblique matrices, no division)More complex; requires division by the depth coordinate
ApplicationsEngineering/technical drawings, CAD, blueprintsRealistic rendering, architecture, games, photography

Part 2: Rotation of Triangle 30° CCW about Pivot (5,3)

Given data:

  • Vertices: $A(5,7)$, $B(12,85)$, $C(5,3)$
  • Angle: $\theta = 30^\circ$ counterclockwise
  • Pivot: $P(p_x,p_y) = (5,3)$

Rotation about a pivot: $$x' = p_x + (x-p_x)\cos\theta - (y-p_y)\sin\theta$$ $$y' = p_y + (x-p_x)\sin\theta + (y-p_y)\cos\theta$$

Trig values: $\cos 30^\circ = 0.8660$, $\sin 30^\circ = 0.5$

Vertex A(5,7): $\Delta x = 0,\ \Delta y = 4$ $$x'_A = 5 + (0)(0.866) - (4)(0.5) = 5 - 2 = 3$$ $$y'_A = 3 + (0)(0.5) + (4)(0.866) = 3 + 3.464 = 6.464$$ $$A' = (3,\ 6.464)$$

Vertex B(12,85): $\Delta x = 7,\ \Delta y = 82$ $$x'_B = 5 + (7)(0.866) - (82)(0.5) = 5 + 6.062 - 41 = -29.938$$ $$y'_B = 3 + (7)(0.5) + (82)(0.866) = 3 + 3.5 + 71.012 = 77.512$$ $$B' = (-29.938,\ 77.512)$$

Vertex C(5,3): $\Delta x = 0,\ \Delta y = 0$ (this is the pivot) $$x'_C = 5 + 0 - 0 = 5,\quad y'_C = 3 + 0 + 0 = 3$$ $$C' = (5,\ 3)$$

Final Result:

  • $A' \approx (3.00,\ 6.46)$
  • $B' \approx (-29.94,\ 77.51)$
  • $C' = (5,\ 3)$

(Note: vertex B(12,85) appears unusually large for a triangle, but the computation follows the given data exactly.)

4asked 2xavg 5 marks · due (skipped 2082) · Midpoint circle drawing algorithm

Digitize circle with center (0, 0) and radius = 6. [5]

Answer
  • Center: $(xc, yc) = (0, 0)$ - Radius: $r = 6$ - Start point: $(x, y) = (0, r) = (0, 6)$ - Initial decision parameter: $p0 = 1 - r = 1 - 6 = -5$ We compute points in the second octant ($x$ from 0 up to $x = y$), then apply 8-way symmetry. - If $p < 0$: choose E, next $x+1$, $y$ same, $p = p + 2x...
5asked 2xavg 5 marks · due (skipped 2082) · Polygon table and error-free generation

Explain the use of polygon tables for boundary representations. [5]

Answer

Polygon tables are data structures used in computer graphics to store and represent the geometric and topological information of 3D objects using polygonal surfaces (typically triangles or quadrilaterals). They form the foundation of boundary representation (B-rep) models. - Polygon tables mainta...

Most repeated questions

Topics asked at least twice, most-asked first.

asked 3xavg 8 marks · 2080, 2079, 0

Write the algorithm for Bresenham's line drawing? Digitize a line with end points A(6, 9) and B(10,5) using Bresenham's line drawing algorithm.[10]

Answer
  • Endpoint A: $(x1, y1) = (6, 9)$ - Endpoint B: $(x2, y2) = (10, 5)$ 1. Input the two endpoints $(x1, y1)$ and $(x2, y2)$. 2. Compute $\Delta x = x2 - x1$ and $\Delta y = y2 - y1$. 3. Plot the first point $(x1, y1)$. 4. Calculate the initial decision parameter: $$p0 = 2\Delta y - \Delta x$$ 5. At...
asked 3xavg 7 marks · 2081, 2079, 0

Write procedure to render the polygon surface by using Phong shading model. [5]

Answer

Phong shading is an interpolation-based shading technique that calculates surface color at each pixel by interpolating normal vectors across the polygon surface and applying the Phong illumination model at each point. - Compute the surface normal at each vertex of the polygon - For a polygon with...

asked 3xavg 7 marks · 2082, 2080, 2079

Describe the concept of Bezier curves in 3D modeling. Derive the equation for a Bezier curve and discuss how it is used in curve modeling and animation.[10]

Answer

Bezier Curves in 3D Modeling

Concept of Bezier Curves

A Bezier curve is a parametric curve defined by a set of control points that influence the shape of the curve without necessarily lying on it. The curve is smooth and continuous, making it ideal for modeling complex shapes in 3D graphics, CAD systems, and animation.

Key characteristics:

  • The curve always passes through the first and last control points (endpoints)
  • Intermediate control points act as "attractors" that pull the curve toward them
  • The curve lies within the convex hull of its control points
  • Smooth and infinitely differentiable
  • Affine invariant (transformation properties are preserved)

Derivation of Bezier Curve Equation

For n+1 Control Points (P₀, P₁, ..., Pₙ)

The parametric equation of a Bezier curve is:

$$B(t) = \sum_{i=0}^{n} P_i \cdot B_{i,n}(t), \quad t \in [0,1]$$

where B_{i,n}(t) are the Bernstein basis functions:

$$B_{i,n}(t) = \binom{n}{i} t^i (1-t)^{n-i}$$

Cubic Bezier Curve (Most Common - 4 Control Points)

For control points P₀, P₁, P₂, P₃:

$$B(t) = (1-t)^3 P_0 + 3(1-t)^2 t P_1 + 3(1-t)t^2 P_2 + t^3 P_3$$

Expanding the Bernstein basis functions:

  • $B_{0,3}(t) = (1-t)^3$
  • $B_{1,3}(t) = 3t(1-t)^2$
  • $B_{2,3}(t) = 3t^2(1-t)$
  • $B_{3,3}(t) = t^3$

Verification: At t=0: B(0) = P₀ (curve starts at first control point) At t=1: B(1) = P₃ (curve ends at last control point)


Applications in Curve Modeling and Animation

1. Curve Modeling

  • Shape Design: Designers adjust control points to create desired curves without manually specifying every point on the curve
  • Smooth Interpolation: Provides smooth, continuous curves for modeling surfaces, paths, and contours
  • Intuitive Control: Control points provide direct, visual feedback for shape manipulation

2. Animation

  • Path Definition: Bezier curves define smooth motion paths for objects and cameras
  • Keyframe Interpolation: Smooth transitions between keyframes in animation sequences
  • Ease-in/Ease-out: Control point positioning creates natural acceleration and deceleration effects
  • Spline Animation: Multiple Bezier curves connected smoothly (C¹ or C² continuity) create complex animation trajectories

3. Practical Examples

  • Font design (TrueType, PostScript fonts use Bezier curves)
  • Vector graphics (Adobe Illustrator, Inkscape)
  • 3D modeling software (Blender, Maya)
  • Motion graphics and visual effects
  • Robot path planning

Advantages

  1. Computationally efficient (De Casteljau's algorithm)
  2. Stable numerical properties
  3. Easy to subdivide and join
  4. Intuitive control through control points
  5. Scalable to any degree

Summary

Bezier curves provide a powerful mathematical framework for creating smooth, controllable curves in 3D space. Their parametric nature and basis function formulation make them ideal for both static modeling and dynamic animation applications, forming the foundation of modern computer graphics and design tools.

asked 3xavg 5 marks · 2082, 2081, 2080

Explain the concept of ambient reflection in the context of illumination models. How does it affect the overall lighting in a 3D scene? [5]

Answer

Ambient reflection is the component of light reflection that accounts for indirect, non-directional illumination in a 3D scene. It represents light that has been scattered and reflected multiple times throughout the environment, coming from all directions uniformly. Non-directional nature: Unlike...

asked 2xavg 8 marks · 2080, 0

Differentiate between parallel and perspective projection. Perform the rotation of triangle with vertices A(5,7), B(12,85) and C(5,3) counterclockwise 30 degree about the pivot point (5,3).[10]

Answer

Model Answer: Parallel vs Perspective Projection and Triangle Rotation

Part 1: Parallel vs Perspective Projection

AspectParallel ProjectionPerspective Projection
ProjectorsProjection lines (projectors) are parallel to each otherProjectors converge to a single point (center of projection)
Center of projectionAt infinityAt a finite distance
Vanishing pointNone; parallel lines remain parallelOne or more vanishing points; parallel lines converge
Depth realismDoes not depict realistic depth; size independent of distanceRealistic depth; distant objects appear smaller (foreshortening)
Scale/proportionTrue dimensions and proportions preservedScale varies with distance from viewpoint
MathematicsSimpler (orthographic/oblique matrices, no division)More complex; requires division by the depth coordinate
ApplicationsEngineering/technical drawings, CAD, blueprintsRealistic rendering, architecture, games, photography

Part 2: Rotation of Triangle 30° CCW about Pivot (5,3)

Given data:

  • Vertices: $A(5,7)$, $B(12,85)$, $C(5,3)$
  • Angle: $\theta = 30^\circ$ counterclockwise
  • Pivot: $P(p_x,p_y) = (5,3)$

Rotation about a pivot: $$x' = p_x + (x-p_x)\cos\theta - (y-p_y)\sin\theta$$ $$y' = p_y + (x-p_x)\sin\theta + (y-p_y)\cos\theta$$

Trig values: $\cos 30^\circ = 0.8660$, $\sin 30^\circ = 0.5$

Vertex A(5,7): $\Delta x = 0,\ \Delta y = 4$ $$x'_A = 5 + (0)(0.866) - (4)(0.5) = 5 - 2 = 3$$ $$y'_A = 3 + (0)(0.5) + (4)(0.866) = 3 + 3.464 = 6.464$$ $$A' = (3,\ 6.464)$$

Vertex B(12,85): $\Delta x = 7,\ \Delta y = 82$ $$x'_B = 5 + (7)(0.866) - (82)(0.5) = 5 + 6.062 - 41 = -29.938$$ $$y'_B = 3 + (7)(0.5) + (82)(0.866) = 3 + 3.5 + 71.012 = 77.512$$ $$B' = (-29.938,\ 77.512)$$

Vertex C(5,3): $\Delta x = 0,\ \Delta y = 0$ (this is the pivot) $$x'_C = 5 + 0 - 0 = 5,\quad y'_C = 3 + 0 + 0 = 3$$ $$C' = (5,\ 3)$$

Final Result:

  • $A' \approx (3.00,\ 6.46)$
  • $B' \approx (-29.94,\ 77.51)$
  • $C' = (5,\ 3)$

(Note: vertex B(12,85) appears unusually large for a triangle, but the computation follows the given data exactly.)

asked 2xavg 5 marks · 2081, 0

Digitize circle with center (0, 0) and radius = 6. [5]

Answer
  • Center: $(xc, yc) = (0, 0)$ - Radius: $r = 6$ - Start point: $(x, y) = (0, r) = (0, 6)$ - Initial decision parameter: $p0 = 1 - r = 1 - 6 = -5$ We compute points in the second octant ($x$ from 0 up to $x = y$), then apply 8-way symmetry. - If $p < 0$: choose E, next $x+1$, $y$ same, $p = p + 2x...
asked 2xavg 5 marks · 2081, 0

Explain the use of polygon tables for boundary representations. [5]

Answer

Polygon tables are data structures used in computer graphics to store and represent the geometric and topological information of 3D objects using polygonal surfaces (typically triangles or quadrilaterals). They form the foundation of boundary representation (B-rep) models. - Polygon tables mainta...

asked 2xavg 5 marks · 2080, 2079

Explain Cohen-Sutherland Line Clipping algorithm with example. [5]

Answer

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 uses a region coding scheme to efficiently identify and clip lines. Divide the plane into 9 regions using a rectangular clipp...

asked 2xavg 5 marks · 2080, 2079

Reflect a line segment having end points (9,3) and (12,10) about a line X = 7. Draw initial and final result graph as well. [5]

Answer
  • Endpoint A = $(9, 3)$ - Endpoint B = $(12, 10)$ - Line of reflection: $x = 7$ (vertical line, $k = 7$) For any point $(x, y)$ reflected about the vertical line $x = k$: $$(x, y) \rightarrow (2k - x,\ y)$$ The $y$-coordinate is unchanged; the $x$-coordinate is mirrored. Here $k = 7$, so $2k = 14...
asked 2xavg 3 marks · 2081, 2080

Z-Buffer Method for Visible Surface Detection

Answer

The Z-Buffer (Depth Buffer) method is an image-space visible surface detection algorithm that determines which surface is closest to the viewer at each pixel position on the projection plane. It maintains two buffers: - Frame Buffer: stores color/intensity values for each pixel - Depth Buffer (Z-...

asked 2xavg 8 marks · 2082, 2080

Given a polygon with vertices $A(3, 4)$, $B(7, 4)$, $C(7, 8)$, $D(3, 8)$, clip it against a rectangular window with coordinates $(4, 5)$, $(6, 7)$ using Sutherland-Hodgman polygon clipping algorithm. [5]

Answer

Polygon vertices (in order): - A(3, 4) - B(7, 4) - C(7, 8) - D(3, 8) Clipping window (rectangle): - Lower-left corner: (4, 5) - Upper-right corner: (6, 7) Derived window edges: - Left: $x{min} = 4$ - Right: $x{max} = 6$ - Bottom: $y{min} = 5$ - Top: $y{max} = 7$ Note: The original polygon ABCD is...

Keep studying

Study every one of these with model answers, flashcards, and MCQs.

Open BIT304 study modes