CS602 – Computer Graphics: Midterm Important Subjective (44 Solved Q&As)
Computer Science • Read every solved subjective question with its model answer directly on this page. Free, no login required.
All 664 Midterm Packs · CS602 Course Page · CS602 MCQ Pack (185 MCQs)
-
What are the two focusing methods in CRT? Explain briefly.
Topic: Display Devices & CRT
The two focusing methods in CRT are: 1. Electrostatic focusing 2. Magnetic focusing In electrostatic focusing, the electron beam passes through a positively charged metal cylinder that forms an electrostatic lens. The electrostatic lens focuses the electron beam at the center of the screen. A similar task can be achieved with a magnetic field set up by a coil mounted around the outside of the CRT envelope. Magnetic lens focusing produces the smallest spot size on the screen and is used in special purpose devices.
-
What is the relation between triads and the shadow mask method?
Topic: Display Devices & CRT
Shadow mask methods can display a wide range of colors. In this technique, each pixel position is made up of three phosphor dots called triads — one red, one green and one blue dot. The shadow mask is a metal plate with holes placed behind the phosphor screen; it ensures that each of the three electron beams strikes only the phosphor dots of its own color in every triad.
-
Discuss in brief the pixel drawing methods.
Topic: Display Devices & CRT
There are three common pixel drawing methods: 1. BIOS routines: These are standard routines built into VGA cards, but they are very slow. Drawing filled triangles, rectangles and circles with them is much slower than the direct memory access method. 2. Direct memory access method: It allows us to write a pixel directly to video memory, bypassing the BIOS routines. It is easy and faster, but its programming is only convenient in mode 13h. 3. Library functions: These are easier to use and even faster, because they are optimized and provided with special drivers by different companies.
-
Suppose an RGB raster system is to be designed using a 10 × 8 inch screen with a resolution of 100 pixels per inch in each direction. If we want to store 12 bits per pixel in the frame buffer, how much storage (in bytes) do we need for the frame buffer?
Topic: Display Devices & CRT
Number of pixels horizontally = 10 × 100 = 1000 Number of pixels vertically = 8 × 100 = 800 Total pixels = 1000 × 800 = 800,000 pixels Storage required = 800,000 × 12 bits = 9,600,000 bits = 9,600,000 / 8 = 1,200,000 bytes (approximately 1.2 MB).
-
Which algorithm finds the closest integer coordinates to the actual line? Summarize this algorithm and suggest some improvements.
Topic: Line & Circle Drawing
Bresenham's line drawing algorithm finds the closest integer coordinates to the actual line. Summary: The algorithm works incrementally. Starting from the first endpoint, it steps along the major axis one pixel at a time and uses an integer decision parameter to decide whether to also step along the minor axis. The decision parameter is updated by simple integer additions, so at every step the pixel closest to the true line is selected without any floating-point calculation. Improvements: The algorithm already improves on DDA by using only integer arithmetic; it can be made faster by pre-computing the constant increments of the decision parameter, and the same incremental idea is extended to circles and ellipses (midpoint algorithms) where symmetry further reduces the work.
-
Why is the Bresenham's line drawing algorithm more efficient than the DDA line drawing algorithm? Give a precise one line answer.
Topic: Line & Circle Drawing
Bresenham's algorithm uses only integer arithmetic, whereas DDA uses floating-point arithmetic.
-
How is the efficiency of circle drawing algorithms improved?
Topic: Line & Circle Drawing
The efficiency of circle drawing algorithms is improved by using the symmetry of the circle. A circle is symmetric in all eight octants, so the algorithm calculates the points of only one octant (using the midpoint circle algorithm) and obtains the remaining seven points simply by reflections across the axes and the diagonals. This reduces the calculation work to one-eighth.
-
Find in which quadrant the point (-2, 3) lies in the 2D plane.
Topic: Points, Vectors & Planes
The point (-2, 3) has a negative x-coordinate and a positive y-coordinate, so it lies in the 2nd quadrant.
-
Formula to find the length of a vector.
Topic: Points, Vectors & Planes
For a vector V = (x, y, z), the length (magnitude) is: |V| = √(x² + y² + z²)
-
Consider these 3-D vectors: A = [9, 8, 7], B = [4, 7, 3], C = [2, 9, 6]. Compute: i) A·(B×C) ii) (A×B)·C
Topic: Points, Vectors & Planes
First compute B×C: B×C = [7×6 − 3×9, 3×2 − 4×6, 4×9 − 7×2] = [15, −18, 22] i) A·(B×C) = 9(15) + 8(−18) + 7(22) = 135 − 144 + 154 = 145 Now compute A×B: A×B = [8×3 − 7×7, 7×4 − 9×3, 9×7 − 8×4] = [−25, 1, 31] ii) (A×B)·C = −25(2) + 1(9) + 31(6) = −50 + 9 + 186 = 145 Both results are equal, as expected for the scalar triple product.
-
How can the locality of a point be defined with respect to a plane?
Topic: Points, Vectors & Planes
One of the most important operations planes let you perform is defining the location of a point with respect to a plane. If you drop a point into the plane equation, it can be classified into three cases: in front of the plane, in back of the plane, or coplanar with the plane. Front is defined as the side of the plane the normal sticks out of.
-
Find the distance between the points (-2, 3) and (-6, 6).
Topic: Points, Vectors & Planes
Distance = √[(−6 − (−2))² + (6 − 3)²] = √[(−4)² + (3)²] = √(16 + 9) = √25 = 5.
-
In which of the planes given below does the point P(2, 0, 3) lie? i) xy plane ii) yz plane iii) zx plane
Topic: Points, Vectors & Planes
The y-coordinate of P(2, 0, 3) is 0, so the point lies in the zx plane.
-
In which situation does an intersection between a line and a plane occur?
Topic: Points, Vectors & Planes
A line intersects a plane in a single point when the line is not parallel to the plane, i.e. when the direction vector of the line is not perpendicular to the plane's normal (their dot product is not zero). If the dot product of the line direction and the plane normal is zero, the line is parallel to the plane: it either lies completely inside the plane or never intersects it.
-
Describe the Right Hand Rule for determination of the direction of axes.
Topic: Points, Vectors & Planes
"Right Hand Rule" for rotations: grasp the axis with the right hand with the thumb oriented in the positive direction; the fingers will then curl in the direction of positive rotation for that axis. The right handed Cartesian coordinate system describes the relationship of X, Y and Z in the following manner: • X is positive to the right of the origin, and negative to the left. • Y is positive above the origin, and negative below it. • Z is negative beyond the origin, and positive behind it.
-
Differentiate between: a) Concave and convex polygons b) Complex and convex polygons c) Filled and unfilled polygons.
Topic: Polygons & Area Filling
a) Concave and convex polygons: If a straight line connecting any two points that are inside the polygon intersects any edge of the polygon, then this polygon is called a concave polygon; otherwise it is a convex polygon. b) Complex and convex polygons: In complex polygons, the vertices (edges) may intersect some other edge of the polygon (self-intersecting), whereas in convex polygons they cannot. c) Filled and unfilled polygons: In an unfilled polygon, only the points on the perimeter of the polygon are drawn. In a filled polygon, all the interior points of the polygon must be filled, i.e. all the pixels within the boundaries of the polygon are set to the specified color or pattern.
-
How can we find whether a point lies inside a polygon or not? Also describe a case in which the boundary fill algorithm may fail.
Topic: Polygons & Area Filling
To test it, draw a line segment from any point that lies outside the polygon to the point P that we wish to test. Count the number of edges that the line crosses. If the number of polygon edges crossed is odd, then P lies inside the polygon; if the number of edges is even, then P lies outside the polygon. This is known as the odd parity (even-odd) rule. The boundary fill algorithm may fail in the case of complex polygons.
-
What are the steps involved in performing the boundary fill algorithm? Also write the pseudo code for these steps.
Topic: Polygons & Area Filling
The boundary fill algorithm performs the following steps: 1. Check the pixel for boundary color. 2. Check the pixel for fill color. 3. Set the pixel in fill color. 4. Run the process for the neighboring pixels. Pseudo code: boundaryFill(x, y, fillColor, boundaryColor) if ((x < 0) || (x >= width)) return if ((y < 0) || (y >= height)) return current = GetPixel(x, y) if ((current != boundaryColor) && (current != fillColor)) setPixel(fillColor, x, y) boundaryFill(x+1, y, fillColor, boundaryColor) boundaryFill(x, y+1, fillColor, boundaryColor) boundaryFill(x-1, y, fillColor, boundaryColor) boundaryFill(x, y-1, fillColor, boundaryColor)
-
What could be the ways to implement area filling on raster systems? Summarize the scan line polygon filling algorithm in your own words.
Topic: Polygons & Area Filling
There are two basic ways to implement area filling on raster systems: 1. Scan-line polygon filling: draw straight lines (fill spans) between the edges of the polygon, scan line by scan line. 2. Seed fill (boundary fill / flood fill): start from an interior point and paint outward from this point until the boundary is reached. Scan line polygon filling algorithm (summary): For each scan line that crosses the polygon, find the intersections of the scan line with all polygon edges, sort these intersection points in increasing x order, and fill the pixels between pairs of intersections (using the odd parity rule). Points are filled in pairs, so the interior spans of the polygon are filled line by line.
-
How can we tackle edges meeting at a vertex, when for both edges the vertex is the minimum point, in the scan line filling algorithm?
Topic: Polygons & Area Filling
We tackle the edges meeting at a vertex in the scan line algorithm by incrementing the parity in the scan line algorithm twice and filling the point at the vertex.
-
Define rotation in 2D.
Topic: 2D & 3D Transformations
A two dimensional rotation is applied to an object by repositioning it along a circular path in the XY plane. To rotate a point, we need its coordinates and the rotation angle θ; the new coordinates are: x' = x cosθ − y sinθ y' = x sinθ + y cosθ Rotation is commonly performed about a fixed point called the pivot point.
-
Give the homogeneous translation matrix for 2D transformation.
Topic: 2D & 3D Transformations
With homogeneous coordinates, the 2D translation by (tx, ty) is expressed as: [ 1 0 tx ] [ 0 1 ty ] [ 0 0 1 ] so that P' = T(tx, ty) · P.
-
Write the formulas of the following: Translation, Scaling, Rotation, Shear and Composite Rotation.
Topic: 2D & 3D Transformations
Translation: P' = P + T, i.e. x' = x + tx, y' = y + ty Scaling: P' = S · P, i.e. x' = x · Sx, y' = y · Sy Rotation: x' = x cosθ − y sinθ, y' = x sinθ + y cosθ Shear: x' = x + Shx · y, y' = y + Shy · x Composite Rotation: P' = R(θ1 + θ2) · P (two successive rotations are additive in angle).
-
What are the steps of scaling with respect to a selected fixed position?
Topic: 2D & 3D Transformations
Scaling with respect to a selected fixed position is performed in three steps: 1. Translate the fixed point to the origin. 2. Scale the object relative to the coordinate origin. 3. Translate the fixed point back to its original position.
-
Give the resultant point when we apply 2D scaling using homogeneous coordinates on the point P(9, 3), about the point (7, 7), taking Sx = 2 and Sy = 3.
Topic: 2D & 3D Transformations
Step 1: Translate the fixed point (7, 7) to the origin: (9 − 7, 3 − 7) = (2, −4) Step 2: Scale with Sx = 2, Sy = 3: (2 × 2, −4 × 3) = (4, −12) Step 3: Translate back: (4 + 7, −12 + 7) = (11, −5) Resultant point = (11, −5).
-
a) Suppose we want to perform 3D scaling using homogeneous coordinates with respect to a point Q(x1, y1, z1). Derive the matrix we should use for this purpose; take Sx = 6, Sy = 4, Sz = 7. b) Suppose we want to perform 3D rotation of 180 degrees about the Y-axis using homogeneous coordinates using reflection. Give the matrix that can do this task.
Topic: 2D & 3D Transformations
a) Scaling with respect to a selected fixed position (x1, y1, z1) is represented by the transformation sequence: 1. Translate the fixed point to the origin. 2. Scale the object relative to the coordinate origin. 3. Translate the fixed point back to its original position. The composite matrix is M = T(x1, y1, z1) · S(6, 4, 7) · T(−x1, −y1, −z1): [ 6 0 0 −5x1 ] [ 0 4 0 −3y1 ] [ 0 0 7 −6z1 ] [ 0 0 0 1 ] b) A rotation of 180 degrees about an axis is equivalent to reflections in the other two coordinates. Rotation of 180 degrees about the Y-axis maps (x, y, z) to (−x, y, −z), so the matrix is: [ −1 0 0 0 ] [ 0 1 0 0 ] [ 0 0 −1 0 ] [ 0 0 0 1 ]
-
Suppose we want to perform the following operations in 2D using homogeneous coordinates, in the order given below: a) Reflection about Y axis b) Rotation of +30 degrees c) Reflection about X axis. Find the resultant composite matrix.
Topic: 2D & 3D Transformations
The individual matrices are: Reflection about Y axis: [ −1 0 0; 0 1 0; 0 0 1 ] Rotation by +30°: [ cos30 −sin30 0; sin30 cos30 0; 0 0 1 ] = [ 0.866 −0.5 0; 0.5 0.866 0; 0 0 1 ] Reflection about X axis: [ 1 0 0; 0 −1 0; 0 0 1 ] Applying the operations in the given order (a first, then b, then c), the composite matrix is M = M(c) · M(b) · M(a): [ −0.866 −0.5 0 ] [ 0.5 −0.866 0 ] [ 0 0 1 ] so that P' = M · P performs all three operations in a single step.
-
How can we perform the shearing transformation? Also discuss its two types.
Topic: 2D & 3D Transformations
Shearing is a transformation that distorts the shape of an object as if its internal layers were caused to slide over each other. In shearing, one coordinate is held fixed while the other coordinate is shifted by an amount proportional to the fixed coordinate. Its two types are: 1. X-shear: the x-coordinate changes in proportion to the y-coordinate: x' = x + Shx · y, y' = y. 2. Y-shear: the y-coordinate changes in proportion to the x-coordinate: y' = y + Shy · x, x' = x.
-
We want to scale an object two times its existing size on the X-axis and Y-axis. Write the scaling matrix for this transformation.
Topic: 2D & 3D Transformations
For scaling by Sx = 2 and Sy = 2, the homogeneous scaling matrix is: [ 2 0 0 ] [ 0 2 0 ] [ 0 0 1 ]
-
How can we express the rotation of an object using homogeneous coordinates in matrix form?
Topic: 2D & 3D Transformations
In 2D, rotation by an angle θ about the origin is expressed with homogeneous coordinates as: [ cosθ −sinθ 0 ] [ sinθ cosθ 0 ] [ 0 0 1 ] In 3D, rotation about the Z-axis by angle θ is: [ cosθ −sinθ 0 0 ] [ sinθ cosθ 0 0 ] [ 0 0 1 0 ] [ 0 0 0 1 ] Rotations about the X and Y axes have the same form, with the rotation applied in the YZ and ZX planes respectively.
-
When we discuss 3D transformations, explain the concept of translation with the help of an example.
Topic: 2D & 3D Transformations
Translation moves every point of an object by the same amount along the X, Y and Z directions. With homogeneous coordinates it is expressed as P' = T(tx, ty, tz) · P, where: [ 1 0 0 tx ] [ 0 1 0 ty ] [ 0 0 1 tz ] [ 0 0 0 1 ] Example: translating the point P(2, 3, 4) by (tx, ty, tz) = (5, −1, 2) gives P' = (2 + 5, 3 − 1, 4 + 2) = (7, 2, 6). The object changes its position but not its shape, size or orientation.
-
Apply the following transformations on the point P(x, y) = (4, 5): 1. Translate using Tx = 3 and Ty = 2 2. Scale using Sx = 2 and Sy = 1.
Topic: 2D & 3D Transformations
Step 1 — Translation by (3, 2): P' = (4 + 3, 5 + 2) = (7, 7) Step 2 — Scaling the translated point by Sx = 2, Sy = 1: P'' = (7 × 2, 7 × 1) = (14, 7) Final position of the point = (14, 7).
-
What is meant by reflection in 2D? Give the reflection matrices for the X and Y axes.
Topic: 2D & 3D Transformations
Reflection is a transformation that produces a mirror image of an object. The mirror image for a 2D reflection is generated by rotating the object 180 degrees about the reflection axis in the plane of the object. Reflection about the X-axis: [ 1 0; 0 −1 ] — (x, y) becomes (x, −y). Reflection about the Y-axis: [ −1 0; 0 1 ] — (x, y) becomes (−x, y).
-
What is meant by Trivial Accept?
Topic: Clipping
Trivial Accept means to save a line with both endpoints inside all clipping boundaries: such a line lies completely inside the clipping window, so it is accepted (drawn) without any intersection calculations.
-
Why does the Cohen-Sutherland line clipping algorithm involve much more calculations than the other line clipping algorithms?
Topic: Clipping
In the Cohen-Sutherland algorithm, most lines require repeated processing: the trivial accept/reject test is applied, and whenever a line crosses a window boundary, intersection points must be calculated and the line is clipped and tested again, edge by edge. Lines that pass near the window corners may be processed several times with unnecessary intersection calculations, which consumes more computational power and time than algorithms that compute the clipping points directly (such as the parametric Liang-Barsky algorithm).
-
Explain the term "Modeling" in the context of the 3D coordinate system.
Topic: 3D Concepts, Projections & Viewing
Modeling is the process of describing an object or scene mathematically — in terms of points, lines, surfaces and volumes positioned in the 3D coordinate system — so that an image of it can be constructed. Objects are first defined in their own local coordinate system and are then placed into the scene (global coordinate system) using modeling transformations such as translation, rotation and scaling.
-
What is the main difference between orthographic projection and oblique projection?
Topic: 3D Concepts, Projections & Viewing
Orthographic projection: If the direction of projection is perpendicular to the projection plane, then it is an orthographic projection. Oblique projection: If the direction of projection is not perpendicular to the projection plane, then it is an oblique projection.
-
What is the taxonomy of the families of projection?
Topic: 3D Concepts, Projections & Viewing
Projections are divided into two main families: 1. Parallel projection: the projection lines are parallel to each other. It has two types: a. Orthographic projection (direction of projection perpendicular to the plane): multiview orthographic and axonometric (isometric, dimetric, trimetric). b. Oblique projection (direction of projection not perpendicular to the plane): cavalier and cabinet. 2. Perspective projection: the projection lines converge at the center of projection (eye point). It is classified by the number of vanishing points as one-point, two-point and three-point perspective.
-
What is a Viewing Frustum?
Topic: 3D Concepts, Projections & Viewing
A viewing frustum is a 3-D volume in a scene positioned relative to the viewport's camera. The shape of the volume affects how models are projected from camera space onto the screen. The most common type of projection, a perspective projection, is responsible for making objects near the camera appear bigger than objects in the distance. For perspective viewing, the viewing frustum can be visualized as a pyramid, with the camera positioned at the tip. This pyramid is intersected by a front and a back clipping plane. The volume within the pyramid between the front and back clipping planes is the viewing frustum. Objects are visible only when they are in this volume.
-
What do you understand by the following matrix in the context of a clipping plane? [ w 0 0 0; 0 h 0 0; 0 0 Q 1; 0 0 −QZn 0 ]
Topic: 3D Concepts, Projections & Viewing
This is the perspective projection (viewing frustum) transformation matrix. It transforms points from the viewing frustum into the normalized clipping volume: the factors w and h scale the x and y coordinates according to the width and height of the frustum, while the third row (with the constant Q, which depends on the near and far clipping planes Zn and Zfar) makes the homogeneous w-coordinate equal to the depth z, so that the perspective division by w produces the foreshortening effect of perspective projection. Points outside the resulting normalized volume are clipped.
-
Which type of professionals use the y-up versus the z-up coordinate system?
Topic: 3D Concepts, Projections & Viewing
In the z-up coordinate system, the Z axis points upward; this convention is used by architects, civil and mechanical engineers and CAD users, because on their drawings height is naturally the Z direction. In the y-up coordinate system, the Y axis points upward; this convention is used by animators, game developers and most 3D animation/graphics packages, where the screen's vertical axis is Y.
-
Differentiate between local and global coordinate systems.
Topic: 3D Concepts, Projections & Viewing
A local coordinate system is defined with respect to a single object: the object's own geometry (its vertices) is described relative to its local origin, independently of everything else in the scene. A global (world) coordinate system is the common coordinate system of the whole scene; every object is positioned in it by applying a modeling transformation to its local coordinates. The same object can be placed at many positions in the global system without changing its local description.
-
What is Rendering?
Topic: 3D Concepts, Projections & Viewing
Rendering is the process of computing a two dimensional image using a combination of a three-dimensional database, scene characteristics, and viewing transformations. Various algorithms can be employed for rendering, depending on the needs of the application.
-
Write the two techniques of triangle rasterization.
Topic: 3D Concepts, Projections & Viewing
The two techniques of triangle rasterization are: 1. Smooth Shaded Triangle Rasterization: the color is interpolated smoothly across the triangle from the vertex colors (Gouraud shading), giving a smooth appearance. 2. Texture Mapped Triangle Rasterization: a texture image is mapped onto the triangle by interpolating texture coordinates across its surface, so the triangle displays the corresponding part of the texture.