Chapter 3
Computer Graphics
TU BSc CSIT past exam questions
Past questions and answers
84 questions set from this chapter. Most repeated first.
- 2079 · 5 marks
Reflect a line segment having endpoints (9,3) and (12,10) about a line Y=7. Draw initial and final result graph as well.
Similar questions: Reflect a line segment having end points (2080)
Answer
Reflection about the horizontal line is done by a composite transformation:
- Translate so the line coincides with the x-axis: .
- Reflect about the x-axis: .
- Translate back: .
So , .
For :
so .
For :
so .
Graph (each point is the same distance from on the opposite side: is 4 below, is 4 above; is 3 above, is 3 below):
y
11 | A'(9,11)
10 | B(12,10)
7 |------------------------------ mirror line y = 7
4 | B'(12,4)
3 | A(9,3)
+--------------------------- x
9 12
The initial line joins to (rising); the final line joins to (falling). The two lines cross at , where , on the mirror line, and the length of the segment is unchanged.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 5 marks
Calculate the total memory required to store a 8 minute video in a SVGA system with 24 bit true color and 25 fps.
Similar questions: Calculate the total memory required to store (2080)
Answer
SVGA resolution is taken as pixels. True colour with 24 bits needs bytes per pixel.
Memory per frame
Number of frames. Duration is s, at 25 frames per second:
Total memory
In binary units:
So about 17.28 x 10^9 bytes (about 16.1 GB) is needed for the uncompressed video.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
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.
Similar questions: Reflect a line segment having endpoints (9,3) (2079)
Answer
Reflection about the vertical line is a composite transformation:
- Translate the line to the y-axis: .
- Reflect about the y-axis: .
- Translate back: .
So , .
For :
so .
For :
so .
Graph
y
10 | B'(2,10) | B(12,10)
| |
| |
3 | A'(5,3) | A(9,3)
+-------------------+-------------------- x
x = 7 (mirror line)
The original segment joins and to the right of the mirror line ; the reflected segment joins and to the left. Each point and its image are at equal distances from the line (: 2 units right, : 2 units left; : 5 units right, : 5 units left), and the length of the segment is unchanged.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
Calculate the total memory required to store a 5 minute video in SVGA system with 24 bit true color and 30 fps.
Similar questions: Calculate the total memory required to store (2079)
Answer
SVGA resolution is taken as pixels. 24-bit true colour needs bytes per pixel.
Memory per frame
Number of frames. Duration is s, at 30 frames per second:
Total memory
In binary units:
So about 12.96 x 10^9 bytes (about 12.07 GB) is needed for the uncompressed video.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 10 marks
Define window, viewport and viewing transformation. Let ABCD be the regular window with A(20, 20), B(90, 20), C(90, 70),and D(20, 70). Find the region codes for end points and use Cohen Sutherland algorithm to clip the lines P(10, 30) Q(80, 90).
Answer
Window. A window is a rectangular area of the world-coordinate scene that is selected for display. Only what lies inside the window is shown.
Viewport. A viewport is the rectangular area of the display device (screen) in device/normalised coordinates into which the contents of the window are mapped.
Viewing transformation (window-to-viewport transformation). It is the mapping of world-coordinate points of the window to the viewport, keeping the relative position of every point. For a point in a window and viewport :
It is carried out by translating the window to the origin, scaling to the viewport size, and translating to the viewport position.
Cohen-Sutherland clipping. The window has , , , (from A(20,20), B(90,20), C(90,70), D(20,70)).
The 4-bit region code is = Top, Bottom, Right, Left: bit 1 = 1 if , bit 2 = 1 if , bit 3 = 1 if , bit 4 = 1 if .
Region codes.
- : so Left = 1; is between 20 and 70. Code .
- : is inside; so Top = 1. Code .
Logical AND of the codes , and the codes are not both 0000, so the line is neither trivially accepted nor rejected. It must be clipped.
Slope: .
Clip P (left boundary, ):
New point . Its code is (inside).
Clip Q (top boundary, ):
New point . Its code is .
Both end points now have code 0000, so the clipped line segment to be displayed is from to .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 10 marks
List any two disadvantages of BSP tree method in visible surface detection. Make a comparision between Painter’s algorithm and A- Buffer algorithm.
Answer
Two disadvantages of the BSP tree method.
- Constructing the BSP tree is expensive (preprocessing), and it needs to be rebuilt when objects move, so it is not suited to dynamic scenes.
- Splitting polygons that cross a partitioning plane increases the number of polygons (and the size of the tree), and the tree can become unbalanced; the number of fragments is hard to predict.
(Also: the tree depends on the choice of splitting planes, and the memory use is high.)
Painter's algorithm vs A-buffer algorithm.
| Basis | Painter's algorithm (depth sort) | A-buffer algorithm |
|---|---|---|
| Type | Object-space method | Image-space method (extension of the depth buffer) |
| Principle | Sort polygons by decreasing depth and paint from farthest to nearest, so nearer surfaces overwrite farther ones | Each pixel position holds a linked list of surface data (depth, colour, opacity, coverage) |
| Data structure | Sorted list of polygons | Accumulation buffer with a linked list per pixel |
| Transparency | Cannot handle transparent surfaces well | Handles transparent and translucent surfaces, and anti-aliasing |
| Overlap/cyclic problems | Cyclic overlap and intersecting polygons need splitting | Handled because depth is stored per pixel (no sorting) |
| Memory | Low | High (a list of surfaces per pixel) |
| Sorting | Required | Not required |
| Speed | Slower for large scenes due to sorting and overlap tests | Slower than the plain z-buffer because of the lists, but robust |
| Anti-aliasing | No | Yes (sub-pixel area coverage) |
Both are hidden surface methods. The painter's algorithm is simple and uses little memory, while the A-buffer gives more accurate results, with transparency and anti-aliasing, at a higher memory cost.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 10 marks
Describe the architecture of raster scan display. Explain about sweep, octree and boundary representations for solid modeling.
Answer
Architecture of a raster scan display. In a raster scan system the screen is a matrix of pixels. The picture is stored in a frame buffer (refresh buffer) as intensity values for each pixel, and the beam sweeps the screen row by row (scan line by scan line) from top to bottom, refreshing the display about 60 times a second.
Components:
- CPU and system memory: run the application program and the graphics package, and place the picture definition in system memory.
- Video controller (display controller): reads the frame buffer, computing the x and y addresses using registers, and controls the horizontal and vertical deflection of the electron beam through the x register (for the column) and y register (for the scan line).
- Frame buffer: a memory area (often a dedicated video RAM) which stores colour/intensity values for every pixel; for bits per pixel it can display colours, with memory size bits.
- Display processor (graphics controller): an optional processor that does scan conversion of graphics primitives, fill and other operations, relieving the CPU.
- Look-up table (colour LUT) and digital-to-analog converters: convert pixel values to analog voltages for the guns of the monitor.
- Monitor (CRT/LCD) shows the image, with the beam sweeping each line left to right with horizontal retrace after each line and vertical retrace after each frame.
CPU <--> System memory <--> Frame buffer <--> Video controller --> Monitor
| ^
+---- Display processor ---------+
Solid-modeling representations.
1. Sweep representation. A solid is built by moving a 2D shape (profile) along a path.
- Translational sweep: a 2D shape swept along a straight line gives a prism or cylinder (extrusion).
- Rotational sweep: a 2D shape rotated about an axis gives a solid of revolution (sphere, cone, vase).
- General sweeps follow a curved path with a changing cross-section. It is simple and easy for symmetric shapes but cannot describe all objects.
2. Octree representation. A cube enclosing the object is recursively subdivided into eight octants. Each octant is marked full (inside the object), empty (outside), or partially filled, and the partial ones are subdivided further until a resolution limit. The data is stored as a tree where each node has eight children. It is a space-partitioning method suited for volume data, medical imaging, and set operations (union, intersection) are easy, but it needs much memory for high resolution and it is approximate.
3. Boundary representation (B-rep). A solid is described by its bounding surfaces: faces, edges and vertices, with the topology (which faces share which edges and vertices) and geometry (equations of surfaces and curves). Polygon meshes are an example. It supports rendering directly and gives exact surface information, and obeys Euler's formula for simple polyhedra. It uses more storage, and checking validity is complex.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 5 marks
Give some basic color model. Give the basic command to draw the pixel and polygon in OpenGL.
Answer
Basic colour models.
- RGB (additive model): colours are produced by mixing Red, Green and Blue light; (0,0,0) is black and (1,1,1) is white. Used by monitors, TVs and cameras.
- CMY / CMYK (subtractive model): Cyan, Magenta, Yellow (plus Black K) pigments subtract light from white; , , . Used in printing.
- HSV (HSB): Hue, Saturation, Value (brightness); intuitive for the user choosing colours.
- HLS (HSL): Hue, Lightness, Saturation.
- YIQ: luminance (Y) and chrominance (I, Q) used in NTSC colour TV broadcasting, which keeps compatibility with black and white sets.
- CIE XYZ: device-independent standard model based on human vision.
OpenGL commands.
Drawing a pixel (point):
glColor3f(1.0, 0.0, 0.0); // set colour red
glPointSize(4.0); // size of the point
glBegin(GL_POINTS);
glVertex2i(100, 50); // pixel at (100, 50)
glEnd();
(A raw pixel block can also be drawn with glDrawPixels(width, height, GL_RGB, GL_UNSIGNED_BYTE, data).)
Drawing a polygon:
glColor3f(0.0, 1.0, 0.0);
glBegin(GL_POLYGON);
glVertex2f(50.0, 50.0);
glVertex2f(150.0, 50.0);
glVertex2f(100.0, 120.0);
glEnd();
glBegin(mode) starts a primitive (GL_POINTS, GL_LINES, GL_LINE_LOOP, GL_POLYGON, GL_TRIANGLES, GL_QUADS), glVertex*() gives its vertices, and glEnd() ends it; glFlush() forces the drawing to be shown.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 5 marks
Trace the Bresenham’s Line drawing algorithm for the end points(1, 1) and (8, 5).
Answer
Bresenham's line algorithm for the end points and .
, . Slope , so is incremented by 1 at each step.
Initial decision parameter:
Rules:
- If : next point and .
- If : next point and .
Starting point .
| k | Next point | |
|---|---|---|
| 0 | 1 | (2, 2) |
| 1 | (3, 2) | |
| 2 | (4, 3) | |
| 3 | (5, 3) | |
| 4 | (6, 4) | |
| 5 | (7, 4) | |
| 6 | (8, 5) |
Pixels plotted: . The last point matches the end point , which confirms the trace.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 5 marks
Derive the relation for three- dimensional translation and rotation.
Answer
Use homogeneous coordinates, so a point is written and each transformation is a matrix.
3D translation. Translating a point by along the axes gives
In matrix form :
The inverse translation uses .
3D rotation. The rotation is by angle about a coordinate axis (positive angle is counter-clockwise looking from the positive axis towards the origin).
Rotation about the z-axis. The coordinate is unchanged, and rotate as in 2D. A point at radius and angle : , . After rotating by :
Rotation about the x-axis. By cyclic permutation of the z-axis result:
Rotation about the y-axis. Cyclic permutation again (, , ):
The inverse of a rotation is its transpose, . For rotation about an axis parallel to a coordinate axis, translate the object so the axis passes through the origin, rotate, then translate back: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 5 marks
What is the purpose of wireframe representation? Describe about boundary and space partitioning.
Answer
Wireframe representation. In a wireframe model an object is represented only by its edges (lines and curves) and vertices, with no surface information. Purpose:
- It is the simplest and fastest representation, with small storage, for quick display and previewing.
- It lets the designer see the overall shape and the internal structure, since all edges (even hidden ones) are visible, so it is used in CAD for design interaction.
- It is used for interactive manipulation such as rotation and checking positions, because it needs little computing.
- It is a starting point for generating surface and solid models.
Its weakness is ambiguity (the same wireframe can be read as different solids), no hidden-line removal, and no volume or surface properties.
Boundary representation. The solid is described by its surface boundary, a set of surface elements (faces, edges and vertices) with their connectivity. The polygon mesh, with vertex, edge and face tables, is typical. The inside is implied by the surface. The representation is exact for polyhedra and renders quickly, but needs a lot of storage for curved objects, and the geometry and topology must be consistent (Euler's formula ).
Space partitioning representation. The 3D space containing the object is divided into non-overlapping solid cells, usually cubes, and the object is described by the cells it occupies. Methods:
- Octree: the cube is recursively divided into 8 octants until each is full, empty, or at the resolution limit.
- BSP tree: space is recursively split by planes into two half-spaces.
- Voxel (uniform grid) / cell decomposition.
It makes volume-related operations, such as union, intersection and mass properties, easy and suits medical imaging, but it is approximate, and needs much memory for fine detail.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 5 marks
Plot the ellipse centered at (0, 0) with radius r_x = 8 and r_y = 6, using mid point ellipse drawing algorithm.
Answer
Midpoint ellipse algorithm with centre , , . , , , . Only the first quadrant is computed; the other quadrants follow by symmetry.
Region 1 (slope magnitude < 1). Start at .
Steps: if , next point and . Otherwise next point and . Continue while .
| k | ||||
|---|---|---|---|---|
| 0 | -332 | (1, 6) | 72 | 768 |
| 1 | (2, 6) | 144 | 768 | |
| 2 | (3, 6) | 216 | 768 | |
| 3 | (4, 5) | 288 | 640 | |
| 4 | (5, 5) | 360 | 640 | |
| 5 | (6, 4) | 432 | 512 | |
| 6 | (7, 3) | 504 | 384 |
At : , so move to region 2.
Region 2. Start from the last point :
Steps: if , next point and . Otherwise next point and . Continue until .
| k | ||
|---|---|---|
| 0 | -23 | (8, 2) |
| 1 | (8, 1) | |
| 2 | (8, 0) |
Points in the first quadrant: .
The points in the other quadrants are . The plot is a smooth ellipse passing through and .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 5 marks
Define clipping. Discuss about cubic spline Interpolation.
Answer
Clipping is the process of identifying the portions of a picture that lie inside (or outside) a specified region, called the clip window, and discarding the rest before display. It is applied to points, lines, polygons, curves and text, and saves the time of scan-converting objects that will never be seen.
Cubic spline interpolation
A spline is a piecewise polynomial curve. A cubic spline passes through a given set of control points (it interpolates them) and is built from cubic segments
For control points there are segments, so unknown coefficients are needed. The conditions are:
- Each segment passes through its two end points ( conditions).
- First-derivative (tangent) continuity at the interior joints, ( conditions).
- Second-derivative (curvature) continuity at the interior joints, ( conditions).
This gives equations. The two remaining conditions are supplied by boundary conditions, for example:
- Natural spline: the second derivative is zero at both end points.
- Clamped spline: the end tangents are specified.
Properties:
- The curve is continuous, so it looks very smooth.
- It passes exactly through all control points.
- It has global control: changing one control point changes the whole curve, since the equations form one linear system.
- Used in animation paths, curve fitting and font design. Related forms are the Hermite, cardinal and Kochanek-Bartels splines, which give local control.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 5 marks
How can we detect shadows in computer graphics? List the challenged in computing light model.
Answer
Shadow detection in computer graphics
A point is in shadow if it cannot "see" the light source, so shadow detection is a visibility problem solved from the light's point of view. Common methods are:
- Shadow rays (ray tracing): from each visible surface point, cast a ray toward every light source. If the ray hits any opaque object before reaching the light, the point is in shadow and that light's diffuse and specular contribution is omitted. This is simple and accurate but costly.
- Shadow mapping (z-buffer method): render the scene from the light's position and store the depth in a shadow map. While rendering from the camera, transform each point into light space and compare its depth with the stored value. If the point is farther than the stored depth, it is in shadow.
- Shadow volumes: each occluder and light define a volume of space that lies in shadow. Counting entries and exits of these volumes (stencil buffer) along the view ray tells whether a point is inside a shadow.
- Projected (planar) shadows: polygons are projected onto a ground plane from the light position and drawn in a dark colour.
Challenges in computing a light model
- Real light interaction (inter-reflection, refraction, scattering) is very complex, so models use approximations.
- Global illumination is computationally expensive; the cost grows with the number of lights and objects.
- Accurate material properties (reflectance, transparency, roughness) are hard to measure and represent.
- Soft shadows (penumbra) from area lights are hard to compute, whereas point lights give only hard shadows.
- Aliasing artefacts appear in shadow maps because of limited resolution.
- Real-time rendering demands a trade-off between realism and speed.
- Colour and intensity representation is limited by the display's range of intensities.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 5 marks
List some applications of VR. What might be the possible navigation techniques and manipulating interfaces in virtual reality? Justify.
Answer
Applications of virtual reality (VR)
- Games and entertainment (immersive games, virtual theatre)
- Education and training (flight simulators, surgery simulation, military training)
- Medicine (therapy, rehabilitation, tele-surgery)
- Architecture and engineering (virtual walk-through of a building, product design)
- Scientific visualisation (molecules, astronomy)
- Virtual tourism, museums and heritage sites
- Marketing and virtual shopping
Navigation techniques
Navigation is how the user moves through the virtual world.
- Physical movement (tracking): the user's real walking or head movement, tracked by sensors, is mapped to movement in the virtual world. It is the most natural, but limited by the size of the tracked space.
- Steering (gaze or hand directed): the user points or looks in a direction and moves that way using a controller or joystick. It is simple and covers large spaces.
- Teleportation: the user selects a target point and is instantly moved there. It reduces motion sickness.
- Walking in place, treadmills: simulate walking while the user stays in one location.
- Map or world-in-miniature: the user picks a location on a small map and is transported there.
Manipulation interfaces
Manipulation means selecting, grabbing, moving and rotating virtual objects.
- Data gloves and hand tracking: direct, natural grasping with the fingers, which gives intuitive control.
- 3D mouse, wand or controllers: a ray is cast from the controller to select an object, which is then moved with a button. Useful for distant objects.
- Haptic devices: provide force feedback so the user feels the object.
- Voice and gesture commands: hands-free interaction.
Justification: the best technique depends on the task. Natural techniques give a greater sense of presence but suffer from limited tracking space and hardware cost, while indirect techniques (teleport, ray-casting) cover large environments with less fatigue and reduce motion sickness. Most systems therefore combine them.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 5 marks
Mention any two color command in OpenGL. Explain about Hermite curve.
Answer
Two colour commands in OpenGL
glColor3f(r, g, b)sets the current drawing colour, with each component in the range 0.0 to 1.0. Example:glColor3f(1.0, 0.0, 0.0);selects red. The variantglColor4falso takes an alpha value.glClearColor(r, g, b, a)sets the colour used to clear the colour buffer (the background), used withglClear(GL_COLOR_BUFFER_BIT). Example:glClearColor(0.0, 0.0, 0.0, 1.0);.
Hermite curve
A Hermite curve is a cubic polynomial curve defined by its two end points and the tangent vectors at those end points. Given , (end points) and , (tangents at and ), the curve is
with the conditions , , , . Solving for the coefficients gives
In matrix form,
The four polynomials are the Hermite blending functions. Properties:
- The curve passes through and .
- The direction and length of the tangent vectors control the shape: a longer tangent makes the curve follow its direction for longer.
- Adjacent segments are continuous if the end tangent of one equals the start tangent of the next.
- It gives local control, and is used in animation and font design.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 10 marks
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).
Answer
Differences between DDA and Bresenham's line algorithm
| DDA | Bresenham's |
|---|---|
| Uses floating-point arithmetic | Uses only integer arithmetic |
| Uses multiplication/division to compute the slope and rounding at each step | Uses only addition, subtraction and shifts, via a decision parameter |
| Rounding is needed at every step, so errors accumulate and the line may drift | No accumulated error; always picks the pixel nearest to the true line |
| Slower | Faster and more efficient |
| Simple to implement | Somewhat more complex |
| Less accurate for long lines | More accurate |
DDA algorithm for end points (2, 2) and (9, 2)
Algorithm:
- , .
- .
- , .
- Starting at , repeat times: , , and plot .
Here , , so , , (a horizontal line).
| k | x | y | Plotted pixel |
|---|---|---|---|
| 0 | 2 | 2 | (2, 2) |
| 1 | 3 | 2 | (3, 2) |
| 2 | 4 | 2 | (4, 2) |
| 3 | 5 | 2 | (5, 2) |
| 4 | 6 | 2 | (6, 2) |
| 5 | 7 | 2 | (7, 2) |
| 6 | 8 | 2 | (8, 2) |
| 7 | 9 | 2 | (9, 2) |
The line is drawn through the pixels (2,2), (3,2), (4,2), (5,2), (6,2), (7,2), (8,2), (9,2).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 10 marks
How polygon table is used in representing polygons? Explain the representations of any three curves.
Answer
Polygon tables
A 3D object is described by a set of polygon surfaces (a polygon mesh). The data are organised in polygon tables, in two groups:
- Geometric tables store the geometry:
- Vertex table: coordinates of every vertex.
- Edge table: for each edge, pointers to its two end vertices.
- Surface (polygon) table: for each polygon, pointers to the edges forming it.
- Attribute tables store properties such as colour, transparency, reflectivity and texture.
Example: the vertex table holds ; the edge table holds ; ; and the surface table holds . This avoids duplicating shared vertices, makes consistency checks easy (every edge belongs to at least one polygon), and gives quick access for rendering. The plane equation of each polygon is also stored; the normal is used for shading and visibility tests.
Representations of curves
- Bezier curve: defined by control points :
It interpolates the first and last control points only, lies inside the convex hull of the control polygon, and has global control. A cubic Bezier () is widely used.
- B-spline curve: a piecewise polynomial of degree :
The blending functions are non-zero only over a limited range, giving local control, and the degree is independent of the number of control points.
-
Hermite curve: a cubic defined by two end points and the tangents at them; it gives continuity between segments.
-
Cubic spline (interpolating): a piecewise cubic through all the given points with continuity.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 10 marks
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.
Answer
Realism in human perception
Realism is the degree to which a computer-generated image appears to the viewer as a real scene. It depends on how well the image reproduces the cues the human visual system uses to perceive the world: perspective (size shrinking with distance), hidden surface removal, shading and light-surface interaction, shadows, texture, colour, transparency and reflection, motion parallax and stereo depth. The more of these cues that are modelled, the more realistic the image feels.
Rendering and image synthesis
- Image synthesis is the overall process of creating a 2D image from a description of a 3D scene (models, materials, lights, camera). It includes modelling, viewing transformation, hidden surface removal, lighting and final display.
- Rendering is the specific stage of that process that computes the colour of each pixel: visibility determination, illumination and shading, texturing, and so on.
So image synthesis is the broader pipeline from scene description to picture, and rendering is its computational core that produces the final shaded pixels.
Polygon rendering methods
-
Constant (flat) shading: one intensity is computed for the entire polygon using its normal and a single illumination calculation, and the whole polygon is filled with that intensity. It is fast, but the individual facets are visible and the surface looks faceted. It is acceptable only for small polygons or distant light sources.
-
Gouraud shading (intensity interpolation):
- Compute the unit normal at each vertex by averaging the normals of the polygons sharing it.
- Apply the illumination model at each vertex to get vertex intensities.
- Linearly interpolate the intensities along the edges, then along each scan line across the polygon.
It removes the intensity discontinuities between facets and gives a smooth look, but can miss specular highlights and produce Mach bands.
-
Phong shading (normal interpolation): interpolate the vertex normals across the polygon and evaluate the illumination model at every pixel. It gives accurate highlights and smoother shading than Gouraud, at a higher computational cost.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Differentiate between vector and raster graphics.
Answer
Vector and raster graphics
| Vector graphics | Raster graphics |
|---|---|
| Image is stored as mathematical descriptions of geometric primitives (points, lines, curves, polygons) | Image is stored as a grid (matrix) of pixels, each with a colour value |
| Resolution independent; scales without loss of quality | Resolution dependent; enlarging causes pixelation (jagged edges) |
| File size depends on the complexity of the drawing and is usually small | File size depends on resolution and colour depth and is usually large |
| Best for logos, line art, technical drawings, fonts | Best for photographs and images with continuous tone |
| Editing individual objects is easy | Editing is done at pixel level |
| Displayed on plotters or vector displays, or converted to pixels when shown | Natural for monitors, printers and scanners |
| Formats: SVG, EPS, AI, PDF | Formats: JPEG, PNG, BMP, GIF |
| Hard to represent photorealistic images | Can represent photorealistic images and subtle shading |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
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.
Answer
Translation moves every point by :
Here , . In homogeneous coordinates,
The translated triangle has vertices , , . Its shape and size are unchanged; only its position has moved.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Differentiate between orthographies, parallel, and perspective projections.
Answer
Projection maps 3D points onto a 2D view plane. There are two main classes: parallel and perspective. Orthographic projection is a special case of parallel projection.
Parallel projection
Projectors (projection lines) are parallel to each other. Object size is preserved regardless of distance, and parallel lines stay parallel. It has two types:
- Orthographic: the projectors are perpendicular to the view plane (front, top and side views). It gives true dimensions and is used in engineering drawing, but shows only one face at a time.
- Oblique: the projectors are parallel but not perpendicular to the plane (cavalier, cabinet), showing the front face true-shaped along with some depth.
Perspective projection
Projectors converge at a single point, the centre of projection. Distant objects appear smaller (perspective foreshortening) and parallel lines not parallel to the view plane converge at vanishing points. It looks realistic, like a camera or the eye, but does not preserve sizes or angles.
| Basis | Orthographic | Parallel (general/oblique) | Perspective |
|---|---|---|---|
| Projectors | Parallel, perpendicular to plane | Parallel, any angle | Converge at a centre of projection |
| Size with distance | Constant | Constant | Decreases |
| Realism | Low | Moderate | High |
| Measurements | True | Mostly preserved | Distorted |
| Use | Engineering drawing | Illustrations | Games, animation, virtual reality |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Describe how a polygon can be represented using BSP tree with example.
Answer
BSP (Binary Space Partitioning) tree
A BSP tree represents a scene by recursively dividing space with planes (lines in 2D). Each polygon's supporting plane splits the remaining polygons into two sets: those in front of the plane and those behind it. Polygons crossing the plane are split into two pieces.
Construction:
- Pick a polygon and use its plane as the root partition.
- Classify every other polygon as in front, behind, or spanning (split the spanning ones along the plane).
- Recursively build the front subtree from the front set and the back subtree from the back set.
- Stop when a set holds one polygon or none.
Each node therefore holds a polygon (and its plane), with a front child and a back child.
Example (2D): let line segments , , be given with and in front of 's line and behind it. Choose as the root. Its front set is and its back set is . Within the front set, choose as the node; if is in front of , then is the front child of .
A
/ \
B D
\
C
Use in display: to draw back to front for a viewpoint , traverse recursively. At each node, if is in front of the node's plane, draw the back subtree, then the node's polygon, then the front subtree; if is behind, reverse this. Once built, the tree can be traversed for any viewpoint, so it is useful in walk-throughs and games, and it supports hidden surface removal and visibility ordering without a z-buffer.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
What is the role of ray tracing in visible surface detection? Explain How scan line algorithm is used for back face detection.
Answer
Role of ray tracing in visible surface detection
In ray tracing, a ray is cast from the viewpoint through each pixel of the view plane into the scene. The ray is intersected with all objects, and the intersection point nearest to the viewer (smallest positive ) gives the visible surface for that pixel. This resolves visibility directly, and it works for curved surfaces too, not just polygons. The same method also traces secondary rays: reflection, refraction and shadow rays, so it gives realistic reflections, transparency and shadows along with hidden surface removal. Its drawbacks are the cost of testing every ray against every object and the need for acceleration structures.
Scan line algorithm and back-face detection
Back-face detection and the scan-line method are two different steps that work together:
- Back-face detection: a polygon with plane equation and outward normal is a back face if , where is the viewing direction (from the viewer toward the object); with the viewer looking along , this is the test . Back faces are removed, which eliminates roughly half the polygons.
- Scan-line processing of the remaining (front-facing) polygons: for each scan line,
- Maintain an edge table (all edges, sorted by ) and an active edge list for the current scan line.
- Find the spans where the scan line crosses polygons.
- Where only one polygon covers a span, fill it with that polygon's colour.
- Where several overlap, compare depths at the span and display the nearest.
- Move to the next scan line, updating and incrementally.
Thus removing back faces first reduces the polygons the scan-line algorithm must handle.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
How virtual realities differ with our real world? Describe some components of VR system.
Answer
How virtual reality differs from the real world
- VR is a computer-generated, simulated environment; the real world is physical.
- In VR, the laws of physics, time and space can be changed or ignored (flying, scaling, teleporting). The real world follows fixed natural laws.
- VR is experienced through devices such as headsets, gloves and trackers, whereas the real world is perceived directly with the senses.
- VR is limited by the resolution, latency and field of view of the hardware, and sensory feedback (touch, smell) is incomplete.
- VR is safe and repeatable (training for dangerous situations) and can be reset, but the real world is not.
- VR requires hardware and software cost; reality is free.
Components of a VR system
- Input devices: trackers (head, hand, body), data gloves, controllers, 3D mouse, microphones. They capture the user's position and actions.
- Output / display devices: head-mounted display (HMD), CAVE projection systems, stereo displays for visuals; speakers/3D audio; haptic devices for touch and force feedback.
- Computer / graphics engine: the processing unit (CPU, GPU) which renders the scene in real time at a high frame rate, to avoid lag and motion sickness.
- VR software and database: the world model (3D objects, textures, physics, behaviour) and the software (VR engine, APIs) managing simulation, interaction and collision detection.
- User interaction interface: navigation and manipulation techniques linking the user to the virtual world.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Write a procedure to draw a line in OpenGL? Describe Painter’s algorithm.
Answer
Procedure to draw a line in OpenGL
#include <GL/glut.h>
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT); // clear the window
glColor3f(1.0, 0.0, 0.0); // red colour
glLineWidth(2.0); // line width
glBegin(GL_LINES);
glVertex2f(-0.5, -0.5); // start point
glVertex2f( 0.5, 0.5); // end point
glEnd();
glFlush();
}
int main(int argc, char **argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(400, 400);
glutCreateWindow("Line");
glClearColor(1.0, 1.0, 1.0, 1.0); // white background
glutDisplayFunc(display);
glutMainLoop();
return 0;
}
glBegin(GL_LINES) treats each pair of glVertex calls as the end points of one line; GL_LINE_STRIP and GL_LINE_LOOP draw connected lines.
Painter's algorithm
This is a depth-sorting (object-space) hidden surface method that imitates a painter who paints the distant parts of a scene first and the nearer parts over them.
Steps:
- Sort all polygons in decreasing order of depth (greatest distance from the viewer first), usually by their farthest vertex or centroid.
- Resolve any ambiguities where depth ranges overlap (test whether polygons can be reordered, or split a polygon).
- Scan-convert (paint) the polygons in that order, so nearer polygons overwrite farther ones.
Advantages: simple, and no depth buffer is needed. Disadvantages: sorting takes time; it fails or needs polygon splitting for cyclically overlapping or intersecting polygons; and every polygon is painted even if hidden, which wastes work.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
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)
Answer
Liang-Barsky line clipping
The line is written parametrically as , , , and the inside conditions , become with
For the line enters the window at ; for it leaves at . Then and .
Given: window , , , ; , .
, .
| k | Type | |||
|---|---|---|---|---|
| 1 (left) | entering | |||
| 2 (right) | leaving | |||
| 3 (bottom) | entering | |||
| 4 (top) | leaving |
Since , part of the line is visible.
New end points:
- :
- : , , giving
The clipped line runs from to .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Define blobby objects. Describe about basic illumination models.
Answer
Blobby objects
Blobby objects (metaballs, soft objects) are shapes that do not have a fixed, rigid surface but show a smooth, fluid distortion when they come near each other, like water droplets merging, molecular structures or muscle shapes. Each object is defined by a density (field) function that falls off with distance from its centre, for example the Gaussian
and the total field is the sum over all the blobs. The surface is the set of points where the total field equals a threshold:
When two blobs come close, their fields add and the surfaces blend smoothly into a single shape. Parameters , and control the size and smoothness.
Basic illumination models
An illumination model computes the intensity of light reflected from a surface point. The components are:
- Ambient light: constant background illumination from the environment, .
- Diffuse reflection (Lambert's cosine law): light scattered equally in all directions from a dull surface; it depends on the angle between the surface normal and the light direction :
- Specular reflection: the bright highlight on shiny surfaces, depending on the angle between the reflected direction and the viewing direction (Phong model):
where is the shininess exponent.
The Phong illumination model adds them:
Other models include the Blinn-Phong model (uses the halfway vector ) and the global models (ray tracing, radiosity).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 10 marks
Define orthographic, parallel, and perspective projections. Consider a region defined by the position vector P = , relative to global XYZ axis system. It is rotated by +30^0 about X-axis and passes through points (1.5, 1.5, 1.5).find the final position of the region.
Answer
Projections
Projection maps 3D points onto a 2D view plane along projection lines (projectors).
- Parallel projection: the projectors are parallel to each other (centre of projection at infinity). Object sizes are preserved and parallel lines remain parallel. Its two types are orthographic and oblique.
- Orthographic projection: a special parallel projection in which the projectors are perpendicular to the view plane (front, top, side views). It preserves true shape and dimensions, so it is used in engineering drawings. For projection on the plane, , .
- Perspective projection: the projectors converge at a centre of projection. Distant objects appear smaller and parallel lines converge at vanishing points, giving a realistic view. With the view plane at distance : , .
Numerical: rotation of 30 degrees about an axis parallel to X through (1.5, 1.5, 1.5)
The rotation axis is parallel to the X axis through the point , so the transformation is: translate by , rotate about X, then translate back:
With , , the rotation about X (for a point relative to the axis) is
For each point, with relative to the axis:
- Point 1 : relative . , . Back: , .
- Point 2 : relative , same result: , .
- Point 3 : relative . , . Back: , .
- Point 4 : relative , so , .
Final position:
The coordinates are unchanged because rotation is about the X direction.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 10 marks
What is the method to recognize boundary point and interior point in solid modeling? Describe how BSP recursively subdivided a space into convex sets.
Answer
Boundary and interior points in solid modelling
In solid modelling, a solid is a set of points in 3D space. Using point-set topology:
- A point is an interior point if a small ball (neighbourhood) around lies entirely within .
- A point is a boundary point if every neighbourhood of , however small, contains both points of and points not in .
- A point is exterior if some neighbourhood of it contains no point of .
The set of all boundary points is the boundary (the surface); the interior is . A valid solid is regular, which means it equals the closure of its interior, , which removes dangling faces, edges or points. Regularised Boolean operations (union, intersection, difference) are used to keep results regular. The test is therefore: shrink a small ball around the point; if it is fully inside, the point is interior; if it straddles inside and outside, it is on the boundary.
BSP tree: recursive subdivision of space into convex sets
Binary Space Partitioning divides space with a plane that splits it into two half-spaces. Each half-space is a convex set, and each half-space is again divided recursively.
- Choose a partitioning plane (usually the plane of one polygon of the object). It divides space into the positive (front) half-space and the negative (back) half-space.
- Every polygon or object part is assigned to the front or back set; any polygon crossing the plane is split along it.
- Recursively repeat steps 1 and 2 on the front set and on the back set. Each recursion creates a new node with two children.
- Stop when each region contains at most one polygon (or is empty/solid), so that every leaf region is a convex cell.
Since each half-space is convex, and the intersection of convex sets is convex, every leaf region is convex. The leaves are labelled in or out of the solid, which gives a solid representation, and the tree can be traversed in back-to-front order for visibility.
P1
/ \
P2 P3
/ \ / \
in out in out
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 10 marks
List some significance of vitual reality. Differntitate between virtual reality and augmented reality with example. Demonstrate how a polygon can be created using OpenGL.
Answer
Significance of virtual reality
- Gives immersive, interactive experience that feels real (presence).
- Allows safe training in dangerous or costly situations (flight, surgery, military).
- Makes it possible to visualise things that cannot be seen: molecules, the inside of the body, planets, unbuilt buildings.
- Helps in education, giving experience-based learning.
- Used in medicine (therapy, rehabilitation), entertainment, design and tourism.
- Reduces the cost of physical prototyping and travel.
Virtual reality vs augmented reality
| Virtual reality (VR) | Augmented reality (AR) |
|---|---|
| Completely replaces the real world with a computer-generated environment | Overlays virtual objects on the real world view |
| User is isolated from the real surroundings | User stays in contact with the real world |
| Needs a headset (HMD), sometimes gloves, trackers | Works with a smartphone, tablet or smart glasses |
| Needs high graphics power for full scenes | Needs less rendering, but needs accurate registration with the real world |
| Example: VR games such as Beat Saber, flight simulator, virtual surgery training | Example: Pokemon Go, Snapchat filters, IKEA furniture preview, head-up display in cars |
Creating a polygon in OpenGL
A polygon is drawn between glBegin(GL_POLYGON) and glEnd(), giving its vertices in order. A convex polygon must be used.
#include <GL/glut.h>
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(0.0, 0.6, 0.3);
glBegin(GL_POLYGON);
glVertex2f(-0.5, -0.5);
glVertex2f( 0.5, -0.5);
glVertex2f( 0.7, 0.2);
glVertex2f( 0.0, 0.7);
glVertex2f(-0.7, 0.2);
glEnd();
glFlush();
}
int main(int argc, char **argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(400, 400);
glutCreateWindow("Polygon");
glClearColor(1.0, 1.0, 1.0, 1.0);
glutDisplayFunc(display);
glutMainLoop();
return 0;
}
This draws a filled pentagon. glPolygonMode(GL_FRONT_AND_BACK, GL_LINE) can be used to draw only the outline.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 5 marks
Discuss the strength and weakness of the human visual system. Describe Spline representation for the curve.
Answer
Strengths and weaknesses of the human visual system
Strengths
- Very high resolution at the centre of vision (fovea), and a wide field of view of about 180 degrees.
- Excellent at pattern recognition, detecting edges, shapes and motion.
- Wide dynamic range: it adapts to a very wide range of brightness (dark to bright).
- Good depth perception using binocular (stereo) and monocular cues.
- Can perceive millions of colours and fill in missing information, so it tolerates noise.
- Persistence of vision lets a sequence of still frames look like smooth motion.
Weaknesses
- Poor resolution and colour perception at the periphery.
- Limited sensitivity to very fine detail; it cannot distinguish pixels beyond a certain angular size.
- Illusions: Mach bands, simultaneous contrast and optical illusions, which can mislead interpretation.
- Perception of absolute brightness is poor (it judges relative brightness), and logarithmic in intensity.
- Flicker is seen below about 50-60 Hz.
- Limited attention and slow adaptation to sudden changes in lighting.
These characteristics are exploited in graphics: for example, frame rates of 24-60 fps, interpolated shading, and limited-colour displays.
Spline representation of a curve
A spline is a flexible curve produced by joining polynomial curve sections smoothly at points called knots. It is specified by control points through which the curve passes (interpolation spline) or around which it is shaped (approximation spline). Each section is usually a cubic polynomial,
The sections join with continuity conditions: (positions meet), (tangents match) and (curvature matches). Specification can be through boundary conditions, a characterising matrix form (with the basis matrix and the geometry vector), or blending functions. Common splines are Hermite, Bezier, B-spline and cardinal splines. They are used in CAD, animation paths, and font design.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 5 marks
Plot the 1^st octant of a circle centered at origin, having the radius 10 units.
Answer
Midpoint circle algorithm, radius , centre at origin
In the first octant ( from 0 to , moving clockwise from ), the decision parameter is
At each step:
- If : next point is and .
- Otherwise: next point is and .
Stop when .
| k | Next point | ||
|---|---|---|---|
| 0 | |||
| 1 | |||
| 2 | |||
| 3 | |||
| 4 | |||
| 5 | |||
| 6 |
At , , so we stop.
Points plotted in the first octant, starting from :
The other octants follow by symmetry: and .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 5 marks
Define fractal. Explain the Bezier curve and B-Spine curve.
Answer
Fractal
A fractal is a geometric object that has a self-similar structure at every scale and a fractal (non-integer) dimension. A fractal is generated by repeatedly applying a simple rule (iteration or recursion), and it shows infinite detail on magnification. Examples: Koch snowflake, Sierpinski triangle, Mandelbrot set, coastlines, mountains, clouds, trees. The similarity dimension is , where the object consists of copies each scaled by (for the Koch curve, ).
Bezier curve
A Bezier curve is defined by control points :
Properties:
- Degree is one less than the number of control points.
- It passes through the first and last control points: , .
- The tangent at the ends is along the first and last control segments.
- It lies inside the convex hull of the control points.
- Changing any control point changes the whole curve (global control).
For the cubic (): .
B-spline curve
where are B-spline basis functions of degree (order ) given by the Cox-de Boor recursion over a knot vector. Properties:
- Degree is independent of the number of control points.
- Local control: moving a control point affects only a limited part of the curve (the basis functions are non-zero over knot intervals).
- The curve lies within the convex hull of its control points.
- Continuity at the knots.
- It does not necessarily pass through the control points, but can be made to by using repeated (multiple) end knots.
B-splines thus overcome the global-control limitation of Bezier curves.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 5 marks
Find the new c-ordinate of the triangle ABC, with co-ordinates A(0, 0), B(1, 1) and C(5, 2) after it has been magnified to twice of its size.
Answer
Magnifying to twice the size is a uniform scaling with about the origin:
The new triangle has vertices , , . Each side is twice its original length, and the figure also moves away from the origin (since scaling is about the origin).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 5 marks
What is the task of a polygon table? Why do we have to remove hidden surfaces? Explain with any one methodology.
Answer
Task of a polygon table
A polygon table stores the description of the polygon surfaces that make up a 3D object, in an organised form that allows quick processing. It has:
- Geometric data: a vertex table (coordinates), an edge table (pointers to the two vertices of each edge) and a surface table (pointers to the edges of each polygon), which also holds the plane equation coefficients .
- Attribute data: colour, transparency, reflectivity and texture of each polygon.
It avoids duplicating shared vertices and edges, helps to check consistency, and gives fast access during transformation, visibility tests and shading.
Why hidden surfaces must be removed
When a 3D scene is projected on the 2D screen, surfaces that lie behind others in the viewing direction would otherwise be drawn on top of nearer surfaces, and the image would look wrong and ambiguous (we could not tell which surface is in front). Removing them gives a correct, realistic picture and also saves processing time since hidden surfaces need no shading.
Method: depth-buffer (z-buffer) algorithm
Two buffers are used: a frame buffer with the colour of every pixel, and a depth buffer holding the depth () of every pixel.
- Initialise the depth buffer to the maximum depth (far plane) and the frame buffer to the background colour.
- For each polygon, and for each pixel it covers, calculate the depth from the plane equation, (incrementally, ).
- If (nearer than what is stored), set and set the frame buffer to the polygon's colour at that pixel; otherwise leave it.
- After all polygons, the frame buffer holds the visible surfaces.
It is simple and works in any polygon order and for any surface, but it needs extra memory and has limited precision and difficulty with transparency.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 5 marks
Define intensity attenuation. Distinguish between Gouraud shading and Phong shading model.
Answer
Intensity attenuation
The intensity of light from a point source decreases as the distance travelled increases. In the physical case, the radiant energy falls off as , where is the distance from the source. In graphics, using only gives too much variation for nearby sources and too little for distant ones, so an attenuation function is used:
where , , are constants. The light intensity at the surface is then . This gives more realistic depth cues, with closer objects brighter than farther ones.
Gouraud shading and Phong shading
| Gouraud shading | Phong shading |
|---|---|
| Interpolates intensities across the polygon | Interpolates surface normals across the polygon |
| Illumination model is evaluated only at the vertices | Illumination model is evaluated at every pixel |
| Fast, with less computation | Slower, with more computation |
| Specular highlights may be missed or appear distorted, if they fall inside a polygon | Highlights are rendered accurately |
| Mach bands may appear | Fewer Mach bands, smoother shading |
| Steps: vertex normals, vertex intensities, interpolation along edges and scan lines | Steps: vertex normals, interpolate normals along edges and scan lines, normalise, apply the illumination model at each pixel |
| Suitable for diffuse surfaces and real-time hardware | Suitable for shiny surfaces and high quality images |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 5 marks
What is the advantage of real time rendering over offline rendering? Discuss the limitation of Z-Buffer algorithm.
Answer
Advantages of real-time rendering over offline rendering
Real-time rendering produces images fast enough (typically 30-60+ frames per second) for the user to interact with the scene, whereas offline rendering (ray tracing or path tracing for films) may take minutes or hours per frame.
- Interactivity: the user can move the camera or objects and see the result immediately, which is essential for games, simulators, VR and CAD.
- Speed: hardware (GPU) pipelines with rasterisation process millions of polygons per second; no waiting for a final render.
- Fast feedback for designers: artists and engineers can change lighting, materials or geometry and judge the result at once.
- Lower cost: it needs no render farm and can run on ordinary consumer hardware.
- Dynamic content: animation, physics and user input can all be handled per frame.
The price is lower realism, since global illumination, accurate shadows and reflections are approximated, while offline rendering gives photo-realistic quality.
Limitations of the Z-buffer (depth-buffer) algorithm
The Z-buffer keeps, for every pixel, the depth of the nearest surface so far and updates the pixel only when a new surface is nearer.
- Extra memory: a depth buffer the size of the frame buffer is needed in addition to the colour buffer.
- Limited precision: depth is stored with finite bits, so two surfaces that are very close can have equal depth values (z-fighting) and may flicker.
- Every polygon is processed: all polygons are scan-converted even if hidden, which wastes time on scenes with high depth complexity (overdraw).
- No transparency: a single depth per pixel cannot handle translucent surfaces; they need extra sorting or an A-buffer.
- No anti-aliasing by itself: one depth per pixel gives jagged edges, and supersampling raises the memory further.
- Only for visible-surface determination: it does not compute shadows, reflections or refraction.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 5 marks
Describe the requirement for line clipping. Explain the scan line polygon filling algorithm.
Answer
Requirement for line clipping
A graphics scene is defined in world coordinates, but only the part inside the clipping window (view volume) is displayed. Line clipping is needed to:
- remove the portions of lines that lie outside the window so that only visible parts are drawn;
- avoid wasting time scan-converting and transforming invisible geometry;
- prevent drawing outside the allowed screen or viewport area (and wrap-around or overflow in the frame buffer);
- speed up later stages, since only the visible segments are passed to the display.
A line is classified as completely inside (accept), completely outside (reject) or partially inside (compute the intersection with window boundaries and keep the inside part). Algorithms such as Cohen-Sutherland and Liang-Barsky do this efficiently.
Scan-line polygon filling algorithm
The polygon is filled one scan line at a time, from the lowest to the highest .
- Find and of the polygon.
- For each scan line between them, find the intersections of the line with all polygon edges.
- Sort the intersection -values in increasing order.
- Pair them up (-, -, ...) and fill pixels between each pair (odd-even rule: the interior lies between the 1st and 2nd, 3rd and 4th intersections, and so on).
- Go to the next scan line and repeat.
Handling of special cases
- A vertex shared by two edges counts as one intersection if the edges lie on opposite sides of the scan line (the vertex is a pass-through), and as two (or zero) if both edges are on the same side (a local minimum or maximum). In practice the upper end of each edge is shortened by one scan line.
- Horizontal edges are ignored; they are filled by the neighbouring scan lines.
Efficiency using edge table and active edge list. For each edge store , the starting at , and the inverse slope . The active edge list holds only the edges crossed by the current scan line. Moving to the next line, the intersection is updated incrementally:
so no line equation need be solved at each step. Edges are added when reaches their and removed when exceeds .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 5 marks
What is quadric surface? Compare between diffuse reflection and specular reflection.
Answer
Quadric surface
A quadric surface is a surface described by a second-degree equation in , , . They are common objects in modelling because they are simple to describe and render. Examples:
- Sphere:
- Ellipsoid:
- Torus, elliptic paraboloid, hyperboloid and cylinder are other quadrics.
Diffuse reflection vs specular reflection
| Basis | Diffuse reflection | Specular reflection |
|---|---|---|
| Surface | Rough, dull surface (chalk, paper) | Smooth, shiny surface (mirror, polished metal) |
| Direction | Light is scattered equally in all directions | Light is reflected mainly in one direction (angle of incidence = angle of reflection) |
| Viewer position | Brightness does not depend on viewpoint | Brightness depends on viewpoint; a highlight appears when the viewer is near the reflection direction |
| Model | Lambert's cosine law: | Phong model: |
| Appearance | Gives the object its basic colour | Gives bright highlight spots; the colour is usually that of the light source |
| Shininess | No shininess exponent | Shininess exponent controls highlight size (larger gives a smaller, sharper highlight) |
Here is the angle between the surface normal and the light direction , is the reflection vector and is the view vector.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 10 marks
Explain the working details of Mid-point circle algorithm? Trace the points along the line path having two end points (6,9) and (2,3) using Bresenham’s line drawing algorithm.
Answer
Mid-point circle algorithm
The algorithm draws a circle of radius centred at the origin (then shifted to ) by calculating only one octant, from to , and using 8-way symmetry for the remaining points. The circle function is
which is negative inside the circle, zero on it and positive outside. At each step is increased by 1 and the algorithm decides between the pixels and by evaluating at their midpoint . The decision parameter is
- If , the midpoint is inside the circle, so the next pixel is and .
- Otherwise the next pixel is and .
Initial point is and the initial parameter is
Steps
- Input and centre ; set , , .
- Plot the 8 symmetric points of shifted by the centre.
- While : increment ; if , then ; else and . Plot the symmetric points.
- Stop when .
Bresenham line from (6,9) to (2,3)
, . Since the slope magnitude is greater than 1, so is the driving axis. Both coordinates decrease, so we trace from to (the same line, reversed); then and both increase.
Rule: increment every step; if , is unchanged and ; if , is incremented and .
| k | Next point | |
|---|---|---|
| 0 | 2 | (3, 4) |
| 1 | -2 | (3, 5) |
| 2 | 6 | (4, 6) |
| 3 | 2 | (5, 7) |
| 4 | -2 | (5, 8) |
| 5 | 6 | (6, 9) |
Starting point is . Points on the path: . These are the same points traced from down to .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 10 marks
Differentiate between object space and image space methods of hidden surface removal. Describe the Z-buffer hidden surface removal algorithm.
Answer
Object space vs image space methods
| Basis | Object-space methods | Image-space methods |
|---|---|---|
| Works on | Objects/polygons in the 3D scene (world/viewing coordinates) | Pixels of the projected image |
| Principle | Compare objects or parts of objects with each other to decide which are visible | For each pixel, determine which object is visible at that pixel |
| Precision | Device independent; exact (floating point) precision | Limited by screen resolution |
| Cost | Roughly comparisons for objects | Roughly for objects and pixels |
| Examples | Painter's (depth-sort) algorithm, back-face detection, area subdivision (Warnock) | Z-buffer, A-buffer, scan-line, ray casting |
| Output | Visible parts can be drawn at any resolution | Must be recomputed if resolution changes |
Z-buffer (depth-buffer) algorithm
Two buffers of the screen size are used: a frame buffer storing the colour of each pixel and a depth buffer storing the depth ( value) of the nearest surface at each pixel.
- Initialise depth buffer to the maximum depth (far plane, e.g. 1.0) and the frame buffer to the background colour: , .
- For each polygon in the scene, scan-convert it. For each pixel covered by the polygon, calculate its depth .
- If (nearer to the viewer), set and surface colour at .
- After all polygons are processed, the frame buffer holds the visible surfaces.
Computing depth. From the plane equation ,
Along a scan line, moving from to gives incrementally
and moving down one scan line at the same gives . These incremental updates make the computation cheap.
Advantages: simple, polygons can be processed in any order, no sorting, easy to implement in hardware. Disadvantages: needs extra memory, cannot directly handle transparency, and wastes effort on hidden polygons.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 10 marks
Write the algorithm for Cohen-Sutherland Line clipping. Clip the polygon A(100,150), B(200,250) and C(300,200) with the clipping window defined by the coordinates (100,300), (300,300) and (200,100) using Sutherland Hodgeman Polygon Clipping algorithm.
Answer
Cohen-Sutherland line clipping algorithm
The plane is divided by the window edges into 9 regions, each with a 4-bit region code (bit 1 = above, bit 2 = below, bit 3 = right, bit 4 = left). The window itself has code 0000. Bits are set by
- bit 1 (TOP) = 1 if
- bit 2 (BOTTOM) = 1 if
- bit 3 (RIGHT) = 1 if
- bit 4 (LEFT) = 1 if
Algorithm
-
Compute the region codes , of the end points , .
-
If (both codes zero), the line is completely inside: accept and draw it.
-
Else if , the line is completely outside on one side: reject.
-
Otherwise (partially visible): pick an end point whose code is not 0000. Find its intersection with the boundary corresponding to a bit set in its code:
- left/right: or ,
- top/bottom: or ,
Replace that end point by the intersection point and recompute its code.
-
Repeat from step 2 until the line is accepted or rejected.
Sutherland-Hodgman polygon clipping
The polygon is clipped against each window edge in turn; the output list of one edge is the input of the next. For each polygon edge from to :
- S out, E in: output the intersection and .
- S in, E in: output .
- S in, E out: output the intersection only.
- S out, E out: output nothing.
Numerical problem. The clipping window is the triangle with vertices , , . Its edges are
- Top: (inside: )
- Right (): , i.e. (inside: )
- Left (): , i.e. (inside: )
Polygon: , , .
Clip against the left edge. (out); (in); (in).
- (out to in): intersection at gives ; output and .
- (in to in): output .
- (in to out): gives ; output this point.
Result: .
Clip against the top edge. All , so every vertex is inside and the list is unchanged.
Clip against the right edge. (in), (in), (out), (in).
- : in to in; output .
- : in to out; gives ; output it.
- : out to in; gives ; output it and .
- : in to in; output .
Final clipped polygon:
Each new vertex lies on a window edge (for example satisfies ), which checks the work.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 5 marks
Differentiate between raster and vector graphics method.
Answer
| Basis | Raster graphics | Vector graphics |
|---|---|---|
| Representation | Image stored as a grid of pixels, each with colour value | Image stored as mathematical descriptions of geometric primitives (points, lines, curves, polygons) |
| Display | Refresh (raster-scan) display; the frame buffer is scanned line by line | Random-scan (calligraphic) display; the beam draws lines directly |
| Scaling | Loses quality (pixelation, jagged edges) when enlarged | Scales to any size without loss of quality |
| File size | Depends on resolution and colour depth; usually large | Depends on complexity of shapes; usually small |
| Realism | Good for photographs and shaded, complex images | Good for line drawings, logos, technical drawings, fonts |
| Editing | Edited pixel by pixel | Individual objects can be edited, moved or recoloured easily |
| Memory | Frame buffer of the whole screen is needed | Only a display list of commands is needed |
| Filling | Easy to fill areas with colours and patterns | Filling is harder |
| Examples | BMP, JPEG, PNG, GIF; Photoshop | SVG, EPS, CDR, AI; Illustrator, CorelDRAW |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 5 marks
Explain about parametric curve. Describe the properties of Bezier curve.
Answer
Parametric curve
A parametric curve expresses each coordinate as a function of an independent parameter (or ), usually in :
For example, a circle is . Unlike , parametric forms can represent closed curves and curves with vertical tangents or multiple values of for one , and they are independent of the axes. Common types are Bezier, B-spline and Hermite curves. A Bezier curve with control points is
Properties of a Bezier curve
- It always passes through the first and last control points: , .
- The curve lies within the convex hull of its control points.
- The tangent at the start and end points is along the first and last control polygon segments: , .
- The degree of the polynomial is one less than the number of control points ( for points).
- The blending functions are non-negative and sum to 1: (partition of unity).
- The curve has global control: moving one control point changes the whole curve (no local control).
- It is symmetric: reversing the order of control points gives the same curve.
- It is invariant under affine transformations (apply the transformation to the control points).
- It is variation diminishing: no straight line crosses the curve more often than it crosses the control polygon.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 5 marks
What are blobby objects? How it is represented? Explain the wireframe representation of 3D objects.
Answer
Blobby objects
Blobby (metaball) objects are non-rigid shapes whose surfaces show a tendency to blend or stick together when brought close, such as molecular structures, liquid drops, melting objects or muscle shapes. A blobby object is not a fixed shape; its form is the result of the interaction of several primitive "blobs".
Representation. Each blob has a Gaussian density distribution around its centre, and the total density function is the sum of these:
where is the distance to the centre of blob , and control the blob's spread and height, and is a threshold. The surface is the set of points where (the sum equals the threshold). Where two blobs are far apart they remain separate; as they approach, their density fields add and a bridge forms between them. Alternatively a finite-range polynomial can be used, for example for and 0 otherwise, which is cheaper to compute.
Wireframe representation of 3D objects
In wireframe (edge) representation the object is shown only by its vertices and edges; surfaces are not drawn or filled. It is stored as:
- a vertex table with the of each vertex, and
- an edge table listing the pair of vertices joined by each edge.
Features:
- It is simple and very fast to draw, so it is used for quick previews and interactive editing.
- It needs little memory and no hidden-surface or shading computation.
- Its drawback is ambiguity: all edges (front and back) are visible, so the viewer may not tell which are in front, and the surfaces and volume are not defined, so one cannot compute properties like volume or do realistic shading.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 5 marks
Find the composite transformation matrix for reflection about a line y=mx+c.
Answer
Let the mirror line be . It has slope angle with and y-intercept . Reflection is done by moving the line onto the x-axis, reflecting, and moving back.
Steps
- Translate the line down by so it passes through the origin: .
- Rotate by so the line coincides with the x-axis: .
- Reflect about the x-axis: .
- Rotate back by : .
- Translate back up by : .
Composite matrix (applied to column vectors, right to left):
The middle product is
Using and , and including the translations:
so that
Check. For (line ): , , correct. For , (line ): , , correct.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 5 marks
What is polygon table? Explain the use of this method in 3D object representation.
Answer
Polygon table
A 3D object is commonly represented by a set of polygon surfaces forming its boundary (a polygon mesh). The data about these polygons is stored in a polygon table, which has two parts:
- Geometric data: the vertices, edges and polygon surfaces.
- Attribute data: the colour, transparency, reflectivity (surface properties) and texture for each polygon.
The geometric data is organised in three tables:
- Vertex table: the coordinates of each vertex, for example .
- Edge table: each edge as a pair of vertices, for example .
- Polygon-surface table: each polygon as a list of its edges, for example .
Example for a triangle pair sharing an edge:
| Vertex table | Edge table | Surface table |
|---|---|---|
| V1 (x1,y1,z1) | E1: V1, V2 | S1: E1, E2, E3 |
| V2 (x2,y2,z2) | E2: V2, V3 | S2: E3, E4, E5 |
| V3 (x3,y3,z3) | E3: V3, V1 | |
| V4 (x4,y4,z4) | E4: V3, V4 | |
| E5: V4, V1 |
Use in 3D object representation
- It gives a compact way to store the object so that each shared vertex or edge is stored only once, saving memory.
- Edges and vertices can be accessed quickly during transformation: the vertex coordinates are transformed once and all the polygons that use them follow.
- It speeds up display, rendering and hidden-surface removal, since each polygon's edges are available directly.
- Consistency can be checked, e.g. every edge must belong to at least two polygons in a closed object and every polygon must be closed; missing vertices or edges can be detected.
- The plane equation of each polygon, (computed from three vertices), can be stored with it to give the normal vector for shading and back-face tests. A point is inside the surface if and outside if it is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 5 marks
Define the term ‘rendering’ in computer graphics. Explain Phong Shading Method with its advantage and disadvantage.
Answer
Rendering
Rendering is the process of generating a two-dimensional image from a 3D model (scene description of geometry, viewpoint, textures, materials and lighting) by a computer program. It covers visibility determination, illumination and shading calculations, producing the final pixel colours.
Phong shading (normal-vector interpolation)
Phong shading interpolates the surface normal vectors across the polygon and applies the illumination model at every pixel, unlike Gouraud shading, which interpolates intensities.
Steps:
- Compute the normal at each polygon vertex as the average of the normals of the polygons sharing that vertex:
- Linearly interpolate the normals along the polygon edges between vertices, and then along each scan line between the edge points.
- For each pixel, normalise the interpolated normal and evaluate the illumination model (ambient, diffuse and specular terms) with it to get the intensity.
For an edge between vertices 1 and 2, with a point at between them, the normal is
Advantages
- Produces realistic, smooth shading and accurate specular highlights, even inside a polygon.
- Greatly reduces Mach-band effects compared with Gouraud shading.
Disadvantages
- Computationally expensive, since the illumination model is evaluated at every pixel (slower than Gouraud).
- Still gives a faceted silhouette, as the polygon edges are not smoothed.
- The interpolation of normals does not account for perspective foreshortening and can give anomalies on very coarse meshes.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 5 marks
Write short notes on (any two)
a. BSP Tree
b. Virtual Reality
c. Intensity Attenuation
Answer
(a) BSP tree (Binary Space Partitioning tree)
A BSP tree is a hierarchical data structure that recursively divides space into two half-spaces by planes. It is used for hidden-surface removal and for ordering polygons back to front.
Construction:
- Choose a polygon from the scene and use its plane as the partitioning plane.
- Classify all other polygons as in front of, behind, or on the plane; a polygon crossing the plane is split into two parts.
- Put the front polygons in the front sub-tree and the back polygons in the back sub-tree; repeat recursively.
Display (painter's style): for a viewpoint, traverse the tree so that polygons on the far side of each plane are drawn first, then the plane's polygon, then those on the near side. The tree depends only on the geometry, so for a static scene it is built once and reused for any viewpoint, which makes it effective in games and in solid modelling.
(b) Virtual reality
Virtual reality (VR) is a computer-generated three-dimensional environment that a user can explore and interact with in real time, so that the user feels immersed in it. It uses:
- a head-mounted display (HMD) with head tracking, so the view changes as the head moves;
- input devices such as data gloves, motion controllers and 3D mice;
- real-time rendering of stereoscopic images, along with 3D sound and sometimes haptic (force) feedback.
Applications include games, training simulators (pilots, surgeons), architectural walk-throughs, education, medicine and entertainment.
(c) Intensity attenuation
The intensity of light from a point source decreases as the distance from the source increases. In the real world this follows the inverse-square law, . Using exactly gives too much variation for sources that are close and too little for distant ones, so graphics systems use
where , , are constants chosen by the user (the constant term prevents the value from becoming very large when is small). The intensity at a surface point is then . Light from a source at infinity (a directional source such as the sun) is not attenuated.
(Any two of the above are required.)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 10 marks
What is a Digital Differential Analyzer (DDA)? How can you draw the line using this algorithm? Trace the points on the line path between A (1,3) and B (6,7) using Bresenham’s line drawing algorithm.
Answer
Digital Differential Analyzer (DDA)
The DDA is a scan-conversion algorithm for drawing a line that uses the differential equation of the line, . It samples the line at unit intervals in one coordinate (the one that changes more) and finds the corresponding value of the other coordinate by adding a constant increment. It is faster than using directly, since it needs only additions, but it uses floating-point arithmetic and rounding, so errors may accumulate.
Drawing a line with DDA from to :
- Compute and .
- Number of steps: .
- Compute the increments: , .
- Set , and plot .
- Repeat times: , ; plot .
(For this gives , ; for it gives , .)
Bresenham's line from A(1,3) to B(6,7)
, , so the slope is and is the driving axis.
At each step increases by 1. If : stays, . If : increases by 1, .
| k | Next point | |
|---|---|---|
| - | - | (1, 3) start |
| 0 | 3 | (2, 4) |
| 1 | 1 | (3, 5) |
| 2 | -1 | (4, 5) |
| 3 | 7 | (5, 6) |
| 4 | 5 | (6, 7) |
Points on the line path: .
Check with : at the exact values are , which round to , as found.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 10 marks
Differentiate between parallel and perspective projection with suitable diagram. Illustrate the window to viewport transformation with example.
Answer
Parallel vs perspective projection
| Basis | Parallel projection | Perspective projection |
|---|---|---|
| Projectors | Parallel to each other | Converge at a single point, the centre of projection |
| Centre of projection | At infinity | At a finite distance from the object |
| Size of object | Size independent of distance; parallel lines remain parallel | Distant objects look smaller (perspective foreshortening); parallel lines converge at vanishing points |
| Realism | Less realistic, but preserves true dimensions and angles (for orthographic) | Realistic, as the human eye and camera see |
| Use | Engineering and architectural drawings | Games, animation, virtual reality |
| Types | Orthographic (front, top, side, axonometric) and oblique (cavalier, cabinet) | One-, two- and three-point perspective |
Parallel: Perspective:
object ---> | \
object ---> | view plane object ----> | view plane
object ---> | / (projectors meet at eye)
In parallel projection with the view plane at looking along , and . In perspective projection with the eye at distance from the view plane,
Window-to-viewport transformation
A window is the region of the world coordinates to be displayed; a viewport is the area of the screen where it is displayed. The mapping keeps the relative position of every point. For a window - and viewport -:
so
It is performed as: translate the window to the origin, scale by , and translate to the viewport position.
Example. Window: to . Viewport: to . Map the point .
The point is mapped to , the centre of the viewport, as expected because is the centre of the window.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 10 marks
Why Liang Barsky Line Clipping Algorithm is efficient than Cohen Sutherland Algorithm? Explain the clipping procedure of Liang Barsky algorithm with suitable example.
Answer
Why Liang-Barsky is more efficient than Cohen-Sutherland
- Cohen-Sutherland may need to compute several intersections of a line with window edges, recalculating region codes and repeating the loop each time; for a line that is partly visible it can clip against up to four boundaries one by one, producing intermediate end points.
- Liang-Barsky uses the parametric form of the line and finds the visible part with the parameter values and directly, using only comparisons and divisions. Intersections are computed only once, at the end, and only when the line is actually visible.
- It rejects trivially invisible lines early, without computing any intersection, so it needs fewer arithmetic operations than Cohen-Sutherland.
Clipping procedure
The line is written as
with and . A point is inside the window if
These four inequalities can be written as for with
Algorithm
- Compute and for all four boundaries.
- If the line is parallel to that boundary; if also it lies outside, so reject it.
- For (line goes from outside to inside) compute ; .
- For (line goes from inside to outside) compute ; .
- If the line is completely outside: reject. Otherwise the clipped line runs from to .
Example. Window: , . Line from to : , .
| k | |||
|---|---|---|---|
| 1 (left) | -10 | 0 - 2 = -2 | 0.2 |
| 2 (right) | 10 | 8 - 0 = 8 | 0.8 |
| 3 (bottom) | -8 | 1 - 2 = -1 | 0.125 |
| 4 (top) | 8 | 8 - 1 = 7 | 0.875 |
and . Since , the line is partly visible.
New end points:
The visible segment is from to . Both points lie on the line and on the left and right window edges respectively.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
Write down algorithm steps of mid-point ellipse drawing algorithm.
Answer
Mid-point ellipse algorithm
For an ellipse with centre at the origin and radii , , the ellipse function is
It is negative inside the ellipse, zero on it and positive outside. Only one quadrant is calculated and the other three come from 4-way symmetry. The quadrant is split into two regions at the point where the slope is : region 1 (slope magnitude less than 1; step in ) and region 2 (slope magnitude greater than 1; step in ).
Algorithm steps
- Input , and the centre . Set the start point .
- Region 1. Compute the initial decision parameter
- At each in region 1, while :
- If : next point is and .
- Else: next point is and .
- Region 2. Using the last point of region 1, calculate
- At each in region 2, until :
- If : next point is and .
- Else: next point is and .
- For each calculated point, plot the symmetric points , shifted by the centre: , .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
Explain the importance of filling algorithms in graphics applications. Differentiate between boundary and flood fill algorithm with algorithm.
Answer
Importance of filling algorithms
Filling algorithms colour or pattern the interior of a closed region (polygon or shape). They are important because:
- they give solid, shaded and realistic-looking objects instead of just outlines;
- they are used in paint programs (bucket tool), CAD, GIS maps, charts and graphs, and games;
- they allow patterns and textures (hatching, tiles) to be applied;
- they are a base for shading, anti-aliasing and clipping of regions on raster displays.
Boundary fill vs flood fill
| Basis | Boundary fill | Flood fill |
|---|---|---|
| Region | Region bounded by a single boundary colour | Region of a single interior colour, bounded by any colours |
| Stops when | The boundary colour is met | A pixel with a colour other than the old (interior) colour is met |
| Inputs | Seed point, fill colour, boundary colour | Seed point, fill colour, old interior colour |
| Use | Regions whose boundary is drawn in one colour | Irregular regions with several-coloured boundary, such as in paint programs |
| Test | getpixel != boundary AND != fill | getpixel == old colour |
Boundary fill algorithm (4-connected)
boundaryFill(x, y, fillColor, boundaryColor):
current = getPixel(x, y)
if current != boundaryColor and current != fillColor:
setPixel(x, y, fillColor)
boundaryFill(x+1, y, fillColor, boundaryColor)
boundaryFill(x-1, y, fillColor, boundaryColor)
boundaryFill(x, y+1, fillColor, boundaryColor)
boundaryFill(x, y-1, fillColor, boundaryColor)
Flood fill algorithm (4-connected)
floodFill(x, y, fillColor, oldColor):
if getPixel(x, y) == oldColor:
setPixel(x, y, fillColor)
floodFill(x+1, y, fillColor, oldColor)
floodFill(x-1, y, fillColor, oldColor)
floodFill(x, y+1, fillColor, oldColor)
floodFill(x, y-1, fillColor, oldColor)
An 8-connected version also recurses on the four diagonal neighbours, so it can fill regions with diagonal gaps. The recursive versions use much stack; a stack/queue or scan-line approach is used in practice.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
What is virtual reality? Explain some form of virtual reality.
Answer
Virtual reality
Virtual reality (VR) is a computer-generated, interactive, three-dimensional environment that gives the user the feeling of being present in it. The user can look around, move through and manipulate the virtual world in real time using special input and output devices (head-mounted display, data glove, motion trackers, haptic devices, 3D sound). Its key features are immersion, interaction and real-time response.
Some forms of virtual reality
- Non-immersive (desktop) VR: the virtual world is viewed on an ordinary monitor and controlled with a keyboard, mouse or joystick. Example: 3D games, CAD walkthroughs.
- Semi-immersive VR: a large screen, projection system or simulator cockpit gives a partly immersive experience while the user stays aware of the real surroundings. Example: flight simulators, driving simulators.
- Fully immersive VR: the user wears a head-mounted display and tracking gear (and sometimes gloves or body suit) that completely cut the user off from the real world. Example: VR gaming, surgery training.
- Augmented reality (AR): computer-generated objects are overlaid on a live view of the real world, for example Pokemon Go or AR navigation.
- Mixed reality (MR): virtual objects interact with the real world and with each other.
- CAVE (Cave Automatic Virtual Environment): a room whose walls are projection screens, giving a shared immersive experience to the users without a headset.
- Telepresence: the user controls a remote real device (robot, surgical instrument) as if present at its location.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
Explain polygon surface representation using Polygon table and polygon meshes.
Answer
Polygon surface representation
A 3D object is most commonly represented by its boundary: a set of flat polygon surfaces that enclose the interior. It is popular because the surfaces are simple to describe, transform and render, and graphics hardware is optimised for polygons. Curved surfaces are approximated by many small polygons.
Polygon table
Polygon data is held in tables:
- Geometric table: a vertex table (coordinates of each vertex), an edge table (each edge as a pair of vertices) and a polygon-surface table (each polygon as a list of its edges).
- Attribute table: colour, transparency, reflectivity and texture for each polygon.
Example: a triangle with edges (V1,V2), (V2,V3), (V3,V1) is stored as . Storing shared vertices and edges once saves memory and makes consistency checks easy (every edge is used by at least one polygon, each polygon closes). The plane equation of each polygon is also stored; is the normal vector used for shading and back-face removal.
Polygon meshes
A polygon mesh is a collection of connected polygons (edges, vertices and faces) that together approximate a surface. Common forms:
- Triangle strip: connected triangles are specified by vertices, which is cheaper than listing vertices.
- Quadrilateral mesh: an array of vertices defines quadrilaterals.
Triangles are preferred because they are always planar. Meshes are used because they are efficient to store and render, can approximate any shape to the required accuracy by using more polygons, and make shading with Gouraud and Phong methods straightforward. A drawback is that a smooth curve needs very many polygons, which increases storage and rendering cost.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
What do you understand by solid modeling? Explain binary space partition method.
Answer
Solid modelling
Solid modelling is a method of representing a 3D object as a complete, unambiguous solid, with a well-defined inside and outside (interior volume), rather than only its surface or edges. Because the volume is known, properties such as mass, volume, centre of gravity and moment of inertia can be computed, and the model can be used for interference checking, cutting and machining simulation. Common representations are:
- Constructive solid geometry (CSG): simple primitives (box, cylinder, sphere, cone) are combined by union, intersection and difference.
- Boundary representation (B-rep): the solid is defined by its bounding faces, edges and vertices.
- Sweep representation: a 2D shape is swept along a path (translational or rotational sweep).
- Spatial partitioning: octrees and BSP trees.
- Cell decomposition / voxel enumeration.
Binary space partition (BSP) method
BSP represents a solid or scene by recursively dividing space with planes into two half-spaces, giving a binary tree.
Construction:
- Select a polygon (or plane) as the partitioning plane. It forms the root node.
- Each remaining polygon is classified as in front of the plane, behind it, or on it. A polygon that crosses the plane is split in two along it.
- The front set becomes the front child and the back set the back child. The same process is applied recursively to each child until each node contains one polygon (or none).
Each node has the form: polygon, front sub-tree, back sub-tree.
Using it for display: with the viewpoint , at each node test whether lies in front of or behind the node's plane. If is in front, display the back sub-tree first (farthest), then the node's polygon, then the front sub-tree. If is behind, do the reverse. This gives a back-to-front order (painter's algorithm) without sorting, and works for any viewpoint, since the tree is independent of the view. Back-face culling can be combined with it.
In solid modelling a BSP tree can also classify a point as inside or outside the solid by locating it through the planes down to a leaf marked as inside or outside. Advantages are fast visibility ordering and support for Boolean operations; the drawback is the cost of building the tree and the extra polygons created by splitting.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
How a realistic image can be generated in computer graphics? Explain fast phong shading.
Answer
Realistic images are produced by combining several steps of the rendering pipeline, each adding a cue the eye uses to judge depth and material:
- Modelling: objects are described with polygon meshes, curved surfaces (Bezier, B-spline) or solids, so that the shape is smooth and detailed.
- Viewing and projection: perspective projection gives size diminution with distance.
- Visible surface detection: hidden surfaces are removed (depth buffer, scan line, BSP) so only front surfaces appear.
- Illumination model: ambient, diffuse and specular components are computed for each point, .
- Surface shading: intensity is interpolated across polygons (Gouraud or Phong shading) so facets look smooth.
- Extra effects: texture mapping, shadows, transparency, reflections (ray tracing) and anti-aliasing.
Fast Phong shading
Ordinary Phong shading interpolates the normal vector across the polygon and evaluates the full illumination model (including the expensive ) at every pixel. Fast Phong shading reduces this cost by using a Taylor-series (forward difference) approximation of the intensity.
Let the normal at a point be interpolated as . The dot products in the illumination model then become
and the intensity is expanded as a Taylor series (quadratic in and ):
Along a scan line, the intensity at the next pixel is obtained from the previous one with only additions using forward differences:
So the coefficients are computed once per polygon and each pixel needs only a few additions instead of a normalisation and an exponentiation.
Steps:
- Determine the unit normals at the polygon vertices (average of the adjoining face normals).
- Compute the coefficients of the quadratic from the vertex data.
- For each scan line, compute the starting intensity and differences, and update incrementally across the span.
Advantage: much faster than true Phong shading and still gives good highlights. Limitation: accuracy falls for large polygons or when the light is close to the surface, since the quadratic is only an approximation.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
Write short notes on
a. OpenGL
b. Flynn’s Classification
Answer
(a) OpenGL
OpenGL (Open Graphics Library) is a cross-platform, language-independent, hardware-independent API for rendering 2D and 3D graphics, developed by Silicon Graphics in 1992 and now maintained by the Khronos Group.
- It provides a set of a few hundred functions (prefixed
gl) for drawing primitives (points, lines, polygons), transformations, lighting, texture mapping, blending and hidden-surface removal with a depth buffer. - It works as a state machine: attributes such as colour, line width and matrix mode are set and stay in effect until changed.
- Related libraries: GLU (utility functions such as
gluPerspective), GLUT/freeglut (window and input handling), GLEW/GLAD (extension loading). - It has a pipeline architecture: vertex processing, primitive assembly, rasterisation, fragment processing, framebuffer operations. Modern OpenGL uses programmable shaders written in GLSL.
- Example:
glBegin(GL_TRIANGLES); glVertex2f(0,0); glVertex2f(1,0); glVertex2f(0,1); glEnd();
(b) Flynn's Classification
Flynn classified computer architectures by the number of instruction streams and data streams that can be processed simultaneously.
| Class | Instruction streams | Data streams | Example |
|---|---|---|---|
| SISD | Single | Single | Conventional uniprocessor |
| SIMD | Single | Multiple | Vector processors, GPUs, array processors |
| MISD | Multiple | Single | Rare; fault-tolerant/pipelined systolic systems |
| MIMD | Multiple | Multiple | Multicore CPUs, multiprocessors, clusters |
SIMD is especially important in graphics because the same operation (e.g. shading) is applied to many pixels or vertices at once; GPUs are built on this idea.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 10 marks
Derive the expression for Bresenham’s Line Drawing algorithm. Trace the points in the line path with starting point (6, 12) and end point (10, 5) using Bresenham’s line drawing algorithm.
Answer
Derivation of Bresenham's line algorithm
Consider a line from to with slope , , . We step by 1 each time and choose between the pixels and .
The true line value at is
The distances from the two candidate pixels are
Their difference is
Define the decision parameter by multiplying by (positive) with :
- If , , so the lower pixel is closer: plot .
- If , plot .
For the next step,
so
The initial value at , where exactly, gives
Only integer additions and subtractions are needed.
Algorithm (for )
- Compute , plot , set .
- For each : if plot and ; else plot and .
- Repeat until .
Tracing (6, 12) to (10, 5)
, , so and the line goes down to the right. Interchange the roles of and : step by each time and decide whether increases. Use (number of steps) and .
- If : unchanged, .
- If : , .
| k | Next point | |
|---|---|---|
| 0 | 1 | start (6, 12) |
| 0 | 1 () | (7, 11) |
| 1 | () | (7, 10) |
| 2 | () | (8, 9) |
| 3 | () | (8, 8) |
| 4 | () | (9, 7) |
| 5 | () | (9, 6) |
| 6 | () | (10, 5) |
Points on the line path: (6,12), (7,11), (7,10), (8,9), (8,8), (9,7), (9,6), (10,5).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 10 marks
What is the major drawback of Sutherland Hodgeman Polygon Clipping Algorithm? Illustrate with a suitable example. Explain B-spline curve and its properties.
Answer
Major drawback of Sutherland-Hodgeman polygon clipping
The algorithm clips a polygon against each clip-window edge in turn, passing the output list of vertices to the next edge. It works well for convex polygons but fails for concave polygons: when the clipped result should consist of two or more separate pieces, the algorithm produces a single polygon with extraneous (false) edges connecting the pieces, because it outputs only one vertex list.
Example: Take a concave "U/L-shaped" polygon whose two arms both cross the right edge of a rectangular window, with the notch (the concave part) lying outside the window. Clipping against that edge keeps the vertices of both arms in a single list, so the output joins the two arms by an edge lying along the window boundary. The correct result is two disjoint polygons, but the algorithm gives one polygon with a degenerate overlapping line along the boundary, which is visible as a spurious line when the polygon is filled or its outline drawn.
Remedies: split the concave polygon into convex parts first, or use the Weiler-Atherton algorithm, which handles concave polygons and holes correctly.
B-spline curve
A B-spline curve is a piecewise polynomial curve defined by control points , a degree (order ) and a knot vector. It is
where the blending functions are given by the Cox-de Boor recursion:
Properties
- The curve is a polynomial of degree in each span, with continuity at the knots.
- Local control: moving one control point changes only the spans nearby, not the whole curve (unlike a Bezier curve).
- The degree is independent of the number of control points (unlike Bezier, whose degree is ); is required.
- Convex hull property: the curve lies inside the convex hull of its control points, and the blending functions sum to 1 () and are non-negative.
- Affine invariance: transforming the control points transforms the curve in the same way.
- Variation-diminishing: the curve is no more wiggly than its control polygon.
- Uniform, open-uniform (the curve passes through the end points) and non-uniform knot vectors give different shapes; a Bezier curve is a special case.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 10 marks
Explain RGB color model. Differentiate between virtual reality and augmented reality with examples. Explain Binary Space Partitioning (BSP) trees with a suitable example.
Answer
RGB colour model
The RGB model is an additive colour model based on the three primaries Red, Green and Blue. Colours are produced by adding light of these three primaries, and it is used in CRT, LCD and LED displays.
- A colour is a triple , normally in or to per channel.
- It is represented by a unit cube: black at the origin, white at the opposite corner, the primaries on the axes, and cyan , magenta , yellow at the other corners. The main diagonal gives greys.
- Mixing: R + G = yellow, G + B = cyan, R + B = magenta, R + G + B = white.
- With 8 bits per channel, 24 bits give about 16.7 million colours.
Virtual reality vs augmented reality
| Point | Virtual Reality (VR) | Augmented Reality (AR) |
|---|---|---|
| Environment | Completely computer-generated, replaces the real world | Real world with computer-generated objects overlaid |
| Immersion | Fully immersive | Partially immersive; user stays aware of surroundings |
| Hardware | Head-mounted display, motion trackers, gloves | Smartphone, smart glasses, HUD |
| Interaction | With the virtual world only | With real and virtual objects together |
| Examples | VR games (Beat Saber), flight simulators, virtual surgery training | Pokemon Go, IKEA furniture placement app, Google Lens, navigation HUD |
Binary Space Partitioning (BSP) trees
A BSP tree recursively divides space with planes into two half-spaces (front and back of the plane). It is used for visible surface determination and for object representation.
Construction:
- Choose a polygon as the root and use its plane as the partition plane.
- Classify all other polygons: in front of, behind, or straddling the plane. Straddling polygons are split into two pieces.
- Recursively build the front subtree and back subtree.
Display (back-to-front, painter style): for viewpoint , at each node, if is in front of the node's plane, draw the back subtree, then the node polygon, then the front subtree; otherwise reverse.
Example: Let a scene have three polygons (root), in front of and behind . The tree is with front child and back child . If the viewer is in front of , the drawing order is ; if behind, it is . If another polygon crosses the plane of , it is split into (front) and (back).
The tree depends only on the geometry, so it is built once and a new view only needs a traversal, which is ideal for static scenes with moving viewers.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
What do you mean by the refresh rate of a display device? Explain vector scan display with a suitable diagram.
Answer
Refresh rate
The refresh rate is the number of times per second that the image on a display is redrawn (refreshed), measured in hertz (Hz). A phosphor in a CRT glows for only a short time, and a raster or vector display must redraw the picture repeatedly to avoid flicker. Rates below about 60 Hz cause visible flicker; typical displays use 60, 75, 120 or 144 Hz. In a raster system the rate is the frame rate (frames per second) at which the frame buffer is scanned out.
Vector scan (random scan) display
In a vector scan display the electron beam is directed only to those parts of the screen where a picture is to be drawn, one line at a time, rather than sweeping the whole screen. The picture is stored as a set of line-drawing commands in a display file (refresh buffer).
CPU --> Display file (refresh buffer) --> Display controller
|
(x,y) DAC / deflection
|
CRT beam --> screen
Operation:
- The application program and graphics package store line-drawing commands in the display file memory.
- The display processor (controller) reads each command in sequence, converts the coordinates into deflection voltages, and moves the beam to draw each line directly.
- After the last command, the cycle restarts, giving a refresh of 30 to 60 times a second.
Features:
- Gives smooth, high-resolution lines with no jagged edges (no aliasing), and needs little memory since only commands are stored.
- Refresh time depends on the number of lines; a complex picture may flicker.
- Not suited to shaded or filled areas and realistic images; used for line drawings, CAD and plotters.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
Plot the first octant of a circle centered at (-2, -2), having a radius of 5 units using the mid-point circle algorithm.
Answer
Mid-point circle algorithm for radius , centre
First generate the circle with centre at the origin, then shift by the centre.
Initial point , initial decision parameter
Rule (while ):
- If : next point ,
- Else: next point ,
| k | |||
|---|---|---|---|
| 0 | (1, 5) | ||
| 1 | (2, 5) | ||
| 2 | (3, 4) | ||
| 3 | (4, 3) | stop since |
The first octant (from to ) is therefore: (0,5), (1,5), (2,5), (3,4).
Now translate by the centre : .
| Origin-centred | Shifted to centre |
|---|---|
| (0, 5) | (-2, 3) |
| (1, 5) | (-1, 3) |
| (2, 5) | (0, 3) |
| (3, 4) | (1, 2) |
Plotted points of the first octant: (-2,3), (-1,3), (0,3), (1,2). The other seven octants follow by symmetry, and about the centre.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
Given a triangle with vertices A(2,3), B(5,5), C(4,3) by rotating 90 degrees about the origin and then translating two units in each direction. Use the homogeneous transformation matrix to find the new vertices of the triangle.
Answer
Vertices: , , . Required transformation: rotation by about the origin, then translation by .
Homogeneous matrices:
Composite matrix (rotation first, so ):
Apply to the vertex matrix (columns are ):
New vertices: , , .
Check: after rotation, , , ; adding gives the same result.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
Construct the Bezier curve with the following polygon vertices (control points): A(1,1), B(2,3), C(4,3), and D(6,4).
Answer
For four control points the Bezier curve is cubic:
with , , , .
Component form:
Evaluate the curve at several values of :
| 0 | 1 | 0 | 0 | 0 | 1 | 1 |
| 0.25 | 0.421875 | 0.421875 | 0.140625 | 0.015625 | 1.922 | 2.172 |
| 0.5 | 0.125 | 0.375 | 0.375 | 0.125 | 3.125 | 2.875 |
| 0.75 | 0.015625 | 0.140625 | 0.421875 | 0.421875 | 4.516 | 3.391 |
| 1 | 0 | 0 | 0 | 1 | 6 | 4 |
Example at : ; .
The curve starts at , ends at , is tangent to at and to at , and passes through approximately , , . It lies inside the convex hull of and does not pass through or .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
Compare the Scanline Method for Visible Surface Detection with the Depth Buffer Method.
Answer
| Point | Scan-line method | Depth-buffer (z-buffer) method |
|---|---|---|
| Approach | Object-space/image-space hybrid; processes the picture one scan line at a time | Image-space; processes polygons one by one, pixel by pixel |
| Data structures | Edge table, polygon table, active edge list | Depth buffer plus refresh (frame) buffer |
| Memory | Small; only the current scan line is held | Large; one depth value per pixel in addition to the frame buffer |
| Visibility test | On each span between edges, find the polygon with the nearest depth; if only one polygon covers the span, no depth comparison needed | Compare of each polygon at every pixel with the stored value |
| Order of polygons | Not required, but needs sorting of edges | Any order |
| Coherence | Uses scan-line, edge and span coherence heavily | Uses depth coherence to compute incrementally across a polygon |
| Complexity | More complex to implement (intersecting or cyclic overlap needs polygon splitting) | Very simple and easy to implement in hardware |
| Transparency, intersecting surfaces | Hard to handle | Handles intersecting surfaces naturally; transparency needs extra work |
| Aliasing | Same pixel-level aliasing | Same; also depth precision problems |
Both give correct visible surfaces; the scan-line method saves memory at the cost of complexity, while the depth-buffer method is simple and widely used in hardware (GPUs).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
Explain any two functions in OpenGL. Write the basic commands to draw the pixel and polygon in OpenGL.
Answer
Two OpenGL functions
-
glClear(GLbitfield mask)clears the buffers named by the mask, for exampleglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);clears the colour buffer to the colour set byglClearColor(r,g,b,a)and resets the depth buffer. It is called at the beginning of each frame. -
glColor3f(GLfloat r, GLfloat g, GLfloat b)sets the current drawing colour, with each component in ; for exampleglColor3f(1.0, 0.0, 0.0);makes subsequent primitives red.
(Others: glViewport, glMatrixMode, glTranslatef, glFlush.)
Drawing a pixel (point)
glPointSize(4.0);
glColor3f(1.0, 1.0, 0.0);
glBegin(GL_POINTS);
glVertex2i(100, 150);
glEnd();
glFlush();
Drawing a polygon
glColor3f(0.0, 0.0, 1.0);
glBegin(GL_POLYGON);
glVertex2f(50.0, 50.0);
glVertex2f(150.0, 50.0);
glVertex2f(150.0, 120.0);
glVertex2f(100.0, 170.0);
glVertex2f(50.0, 120.0);
glEnd();
glFlush();
glBegin(mode) starts a list of vertices and glEnd() terminates it; glVertex* supplies each vertex. GL_POLYGON fills a convex polygon; GL_TRIANGLES and GL_QUADS are other options.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
Differentiate between parallel projection and perspective projections.
Answer
Projection maps 3D points to a 2D view plane. The two main classes are parallel and perspective projection.
| Point | Parallel projection | Perspective projection |
|---|---|---|
| Projectors | Parallel lines | Converge at a single point, the centre of projection |
| Centre of projection | At infinity | At a finite distance from the object |
| Size of object | Independent of distance from the view plane; no diminution | Farther objects look smaller (perspective foreshortening) |
| Parallel lines | Remain parallel | Converge at vanishing points (unless parallel to the view plane) |
| Realism | Less realistic | More realistic, like human vision or a camera |
| Shape and measurements | Preserves relative proportions, angles in the faces parallel to the plane; accurate measurements | Distorts distances and angles; measurements are not preserved |
| Types | Orthographic (front, top, side, axonometric/isometric) and oblique (cavalier, cabinet) | One-, two- and three-point perspective, by number of vanishing points |
| Matrix | Affine; last row | Non-affine; the homogeneous coordinate , needs division by |
| Uses | Engineering and architectural drawings, CAD | Games, animation, simulation, realistic scenes |
For perspective with the view plane at from the centre of projection at the origin: , . For orthographic projection onto : , .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
Describe any two basic illumination models.
Answer
An illumination (lighting) model computes the intensity of light reflected from a surface point toward the viewer. Two basic models are described below.
1. Ambient light model
Ambient light is the uniform background light reflected by all surfaces from the surroundings; it has no direction. The reflected intensity is
where is the ambient light intensity and () is the ambient reflection coefficient of the surface. A scene with only ambient light looks flat, since every point on the object gets the same intensity.
2. Diffuse reflection (Lambertian) model
Ideal diffuse reflectors (dull, matte surfaces) scatter light equally in all directions, so the intensity does not depend on the viewing direction but on the angle between the surface normal and the direction to the light source (Lambert's cosine law):
with the diffuse coefficient and the intensity of the point source. Combined with ambient light:
(Specular reflection / Phong model), adds a highlight for shiny surfaces:
where is the reflection direction, the viewing direction and the shininess exponent. The full Phong model is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
Write short notes on:
a) Sweep Representation
b) Intensity Attenuation
Answer
(a) Sweep representation
Sweep representation constructs a 3D solid by moving a 2D shape or a 3D object along a path through space.
- Translational sweep: a 2D region is moved along a straight line perpendicular to its plane. A rectangle swept along a line gives a cuboid; a circle gives a cylinder. The solid is the union of all positions of the shape.
- Rotational sweep: a 2D shape is rotated about an axis, for example a semicircle swept gives a sphere, and a rectangle gives a cylinder or a rectangle offset from the axis gives a ring (torus when the shape is a circle).
- General sweep: the path can be curved and the shape can scale or rotate along the path (e.g. pipes, spiral staircases, spring).
It is simple, produces symmetric objects efficiently and is used in CAD, but cannot represent arbitrary shapes; usually it is combined with Boolean operations in constructive solid geometry.
(b) Intensity attenuation
The intensity of light from a point source decreases as it travels away from the source; this is intensity attenuation. In theory it follows the inverse-square law, , where is the distance from the source. In practice a pure gives too much variation between near and far surfaces when the light is far or too little when the source is close, so a function with a bounded value is used:
where are constants that can be adjusted. The radial intensity attenuation is then , so the diffuse term becomes
It gives depth cues: nearer surfaces look brighter, and farther ones are darker, which makes the image more realistic. For a light at infinity no attenuation is applied.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2082 · 10 marks
Explain Bresenham’s line drawing algorithms. Compare it with DDA line algorithm. Draw a line from (2, 3) to (10, 8) by using Bresenham’s algorithm.
Answer
Bresenham's line drawing algorithm
Bresenham's algorithm draws a line using only integer arithmetic. For a line with it moves one pixel in at each step and decides whether stays the same or increases by 1, using a decision parameter based on the difference of the distances of the two candidate pixels from the true line.
With , :
- Plot the start point and compute .
- At each : if , plot and ; otherwise plot and .
- Repeat times. For other slopes, swap the roles of and or change the signs of the steps.
Comparison with DDA
| Point | DDA | Bresenham |
|---|---|---|
| Arithmetic | Floating point: , needs rounding | Integer only: additions, subtractions and shifts |
| Speed | Slower (rounding, floating point) | Faster |
| Accuracy | Round-off error accumulates, the line may drift for long lines | No accumulated error, the closest pixel is always chosen |
| Hardware | Harder to implement | Easy to implement in hardware |
| Result | Less accurate | More accurate and efficient |
Line from (2, 3) to (10, 8)
, , .
| k | Next pixel | |
|---|---|---|
| start | (2, 3) | |
| 0 | 2 () | (3, 4) |
| 1 | () | (4, 4) |
| 2 | () | (5, 5) |
| 3 | () | (6, 6) |
| 4 | () | (7, 6) |
| 5 | () | (8, 7) |
| 6 | () | (9, 7) |
| 7 | () | (10, 8) |
Pixels plotted: (2,3), (3,4), (4,4), (5,5), (6,6), (7,6), (8,7), (9,7), (10,8).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2082 · 10 marks
What is a polygon mesh? Describe its types. Construct a polygon table and edge table for a cube of side 2 units placed with one vertex at origin.
Answer
Polygon mesh
A polygon mesh is a collection of vertices, edges and polygonal faces (usually triangles or quadrilaterals) that together define the surface of a 3D object. Each edge is shared by at most two faces, and it is the most common representation in graphics because polygons are easy to transform, shade and render in hardware.
Types of polygon mesh representations
- Explicit representation: each polygon is stored as a list of its vertex coordinates, . It is simple, but shared vertices are repeated, wasting memory and risking cracks.
- Pointers to a vertex list: vertices are stored once in a vertex list, and each polygon stores indices into it. Shared vertices are not duplicated, but shared edges are still drawn twice.
- Pointers to an edge list: each polygon points to edges in an edge list; each edge points to its two vertices (and the polygons that share it). Edges are drawn only once, and adjacency information is available.
Also, by structure: triangle meshes, quad meshes, triangle strips/fans, and general polygon meshes.
Cube of side 2 with one vertex at the origin
Vertices:
| V | (x, y, z) |
|---|---|
| V1 | (0,0,0) |
| V2 | (2,0,0) |
| V3 | (2,2,0) |
| V4 | (0,2,0) |
| V5 | (0,0,2) |
| V6 | (2,0,2) |
| V7 | (2,2,2) |
| V8 | (0,2,2) |
Edge table (12 edges):
| Edge | Vertices | Edge | Vertices |
|---|---|---|---|
| E1 | V1, V2 | E7 | V7, V8 |
| E2 | V2, V3 | E8 | V8, V5 |
| E3 | V3, V4 | E9 | V1, V5 |
| E4 | V4, V1 | E10 | V2, V6 |
| E5 | V5, V6 | E11 | V3, V7 |
| E6 | V6, V7 | E12 | V4, V8 |
Polygon (surface) table (6 faces):
| Face | Description | Edges |
|---|---|---|
| F1 | Bottom () | E1, E2, E3, E4 |
| F2 | Top () | E5, E6, E7, E8 |
| F3 | Front () | E1, E10, E5, E9 |
| F4 | Back () | E3, E11, E7, E12 |
| F5 | Left () | E4, E12, E8, E9 |
| F6 | Right () | E2, E11, E6, E10 |
Each edge appears in exactly two faces, as required for a closed mesh (Euler: ).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2082 · 10 marks
Explain the Painter’s algorithm for visible surface detection. Explain the BSP tree method used for visible surface determination. How does it divide the space and organize objects in a scene?
Answer
Painter's algorithm
The painter's algorithm (depth-sort algorithm) works like a painter who paints distant parts of a scene first and nearer ones over them. It is an object-space/image-space method.
Steps:
- Sort all polygons by decreasing depth, using the farthest value (or the mean ) of each polygon.
- Resolve ambiguities where the ranges of two polygons overlap. For polygons (farthest) and , check in order whether (i) their extents do not overlap, (ii) their extents do not overlap, (iii) is wholly behind 's plane, (iv) is wholly in front of 's plane, (v) their projections do not overlap. If any test passes, can be drawn before ; otherwise swap them, and if there is still a problem (cyclic overlap or intersecting polygons) split a polygon.
- Scan convert the polygons in order from back to front, so nearer polygons overwrite farther ones.
Advantages: simple, handles transparency easily. Disadvantages: sorting cost, cyclic overlap and intersecting surfaces need splitting, and overdraw wastes time.
BSP tree method
Binary Space Partitioning builds a tree that subdivides the scene using planes, and the tree is traversed in a view-dependent order to give a back-to-front list without sorting each frame.
How it divides space:
- Select a polygon from the scene; its plane divides space into two half-spaces: front (where ) and back ().
- Put every other polygon in the front list or back list depending on its side. Polygons that cross the plane are split along the plane into two parts, one on each side. Polygons lying in the plane stay with the root node.
- Recursively repeat on each list until each contains at most one polygon.
How objects are organised: each internal node stores a polygon (the partitioning plane) and has a front child (polygons in front) and a back child (polygons behind); the leaves are empty or single polygons.
Display: traverse the tree with respect to the viewpoint . At each node, evaluate the plane equation at : if is in front, display back subtree, the node polygon, then the front subtree; if is behind, display the front subtree, the node, and the back subtree. The result is back-to-front drawing (painter style), with correct occlusion.
The tree is built once for static geometry, so each new view only needs a linear traversal. The drawback is that the build is expensive, splitting increases the polygon count, and it is not suited to moving objects.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2082 · 5 marks
Explain the need for machine-independent graphics languages. How do such standards benefit application developers?
Answer
Need for machine-independent graphics languages
Early graphics programs were written for specific display devices with their own commands, so they could not run on other hardware. A machine-independent graphics language or standard (GKS, PHIGS, OpenGL, DirectX, Vulkan) defines a common set of functions that work regardless of the underlying hardware, operating system or manufacturer. This is needed because:
- Display devices (CRT, LCD, plotters, printers) and graphics cards differ greatly in resolution, colour and commands.
- Rewriting the program for every device is costly and error-prone.
- Software needs to be portable between systems and must survive hardware upgrades.
- A shared interface lets hardware vendors write drivers, while application developers write programs only once.
Benefits to application developers
- Portability: the same source code runs on many platforms and devices with little or no change.
- Reduced development time and cost: developers use ready-made functions for primitives, transformations, viewing, lighting and textures instead of writing low-level device code.
- Device independence: the program describes the picture in abstract coordinates; the driver maps it to the actual device.
- Standardisation and learning: a well-defined API with documentation makes it easier to learn and to share code and skills.
- Easier maintenance and upgrade: new hardware can be supported by new drivers without changing the application.
- Hardware acceleration: standard calls are mapped to the graphics card features, giving good performance.
- Interoperability and reuse: libraries and tools built on the standard can be reused.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2082 · 5 marks
Define 2D rotation in computer graphics. Derive the rotation matrix and calculate the new coordinates of a point (2, 3) after a rotation of 45° about the origin.
Answer
2D rotation
Rotation turns an object about a pivot point (here the origin) through an angle along a circular path in the plane; positive is anticlockwise.
Derivation
Let a point be at distance from the origin at angle from the -axis:
After rotation by the point is at angle :
Substituting and :
In matrix form (homogeneous):
Rotating by
.
The new point is . Check: the distance from the origin is , unchanged.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2082 · 5 marks
How is the transformation matrix computed when switching from one coordinate system to another? Illustrate with an example
Answer
Transformation between coordinate systems
To express a point given in one Cartesian system in another system , we move and rotate the second system until it coincides with the first. Suppose the origin of is at in the system, and its axis is rotated by an angle from the axis.
Steps:
- Translate so the origin of moves to the origin of : .
- Rotate by so the axis coincides with the axis: .
An equivalent description: the rows of the rotation part are the unit vectors of the new axes expressed in the old system. The inverse converts back. In 3D the same idea applies, using the unit vectors of the new axes as rows of the rotation matrix.
Example
The system has its origin at and is rotated by . Find the coordinates of in .
So is in the new system. Check: the vector from the new origin is ; the axis points along , giving , and the axis along , giving .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2082 · 5 marks
Explain the 3D viewing pipeline in computer graphics. Explain about how a 3D world coordinate system is transformed to a 2D screen.
Answer
3D viewing pipeline
The 3D viewing pipeline is the sequence of transformations and operations that converts an object defined in 3D world coordinates into a 2D image on the display device.
Modelling coords -> World coords -> Viewing (camera) coords
-> Projection coords -> Normalised coords -> Device (screen) coords
- Modelling transformation: each object, defined in its own local coordinates, is placed in the scene (world coordinates) by scaling, rotation and translation.
- Viewing transformation: the world is transformed to the camera system. The viewer is placed at the origin looking down an axis, by translating the view reference point to the origin and rotating so that the view-plane normal , view-up vector and coincide with the axes.
- Projection transformation: 3D camera coordinates are projected onto the view plane, by parallel projection () or perspective projection (). Objects are clipped against the view volume (frustum or box), here or in normalised coordinates.
- Normalisation and clipping: the view volume is mapped to a canonical volume (e.g. a unit cube); clipping and visible-surface detection are applied, and hidden surfaces removed.
- Viewport (workstation) transformation: the projected window is mapped to the viewport in device coordinates by scaling and translating:
and similarly for .
- Rasterisation: the 2D primitives are scan converted into pixels, with shading and the depth buffer.
From 3D world to 2D screen: a world point is multiplied by the viewing matrix to get camera coordinates, then by the projection matrix (with a divide by for perspective) to get a 2D point on the view plane, and finally by the window-to-viewport mapping to get pixel coordinates .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2082 · 5 marks
For control points P0(0,0), P1(1,2), P2(3,3), and P3(4,0), calculate the Bezier curve point at u = 0.5. Also plot the rough curve shape.
Answer
The cubic Bezier curve is
At the blending weights are:
With , , , :
Point at : .
Check by de Casteljau: midpoints of the control polygon give , , ; then , ; then . This agrees.
Rough shape: the curve starts at going toward (steeply upward at slope 2), rises in an arch passing through about at the middle, and curves downward to finish at with a tangent along (slope ). Other points: and approximately. It is symmetric-looking, a smooth hump below the control polygon's peak at height 3, and it lies inside the convex hull of the four points.
y
3 | P2
2 | P1 . ___
| .--' '--.
1 | ./ '.
| ./ \
0 +-P0------------------P3-- x
0 1 2 3 4
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2082 · 5 marks
What is spatial-partitioning representation? Explain how it differs from boundary representation in terms of geometry storage and processing.
Answer
Spatial-partitioning representation
In spatial-partitioning (space-subdivision) representation a solid is described by dividing the space it occupies into small non-overlapping solid units and recording which units are inside the object. Common forms:
- Voxel (cell) enumeration: space is divided into a regular grid of cubes (voxels); each is marked occupied or empty.
- Octree: the cube enclosing the object is recursively divided into 8 octants. Each node is labelled full, empty or mixed, and only mixed nodes are divided further.
- BSP tree: space is recursively split by planes into two half-spaces.
Difference from boundary representation (B-rep)
B-rep describes an object by its bounding surfaces: faces, edges and vertices (polygon meshes, spline patches), with the interior being implied.
| Point | Spatial partitioning | Boundary representation |
|---|---|---|
| Geometry stored | The volume occupied: cells/voxels or tree nodes | Only the surface: vertices, edges, faces |
| Storage | Can be large for fine resolution (voxel grids grow as ); octrees reduce it | Compact for simple shapes |
| Accuracy | Approximate, determined by cell resolution | Exact (for polygons or curved patches) |
| Interior information | Explicit; easy to test whether a point is inside | Implicit; needs ray casting or normal tests |
| Processing | Boolean operations, volume, mass and collision tests are simple (set operations on cells) | Rendering, transformation and display are fast and direct; Boolean operations are complex |
| Typical uses | Medical imaging (CT, MRI), scientific data, collision detection, 3D modelling of solids | CAD, games, animation, general rendering |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2082 · 5 marks
What is constant intensity shading? Compare Phong shading and fast Phong shading.
Answer
Constant intensity shading
Constant intensity (flat) shading applies one illumination calculation per polygon, using a single normal for the whole polygon, and fills the entire polygon with that intensity.
- It is fast and simple.
- It is accurate only when the surface is truly flat, the light and the viewer are far away so that and are almost constant over the polygon.
- On curved surfaces approximated by polygons, the individual facets are visible, and intensity discontinuities appear at the edges (Mach band effect).
Phong shading vs fast Phong shading
| Point | Phong shading | Fast Phong shading |
|---|---|---|
| Method | Interpolates the surface normal across the polygon (from vertex normals) and evaluates the full illumination model at each pixel | Approximates the intensity with a Taylor-series (quadratic) expansion in and updates it incrementally along the scan line |
| Per-pixel work | Normalise the normal, compute , , raise to power | A few additions using forward differences |
| Speed | Slow (about 6 to 8 times Gouraud) | Considerably faster, close to Gouraud shading |
| Accuracy | Most accurate; good specular highlights | Slightly less accurate, particularly for large polygons or sharp highlights |
| Normals | Interpolated and re-normalised per pixel | Interpolation of normal is incorporated into the polynomial coefficients; no per-pixel normalisation |
| Use | When high quality is needed | When speed matters and an approximate result is acceptable |
Both give smooth shading and highlights inside polygons, unlike constant shading.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2082 · 5 marks
Discuss the use of virtual reality in education. How does VR enhance student engagement and learning outcomes?
Answer
Use of virtual reality in education
Virtual reality (VR) places learners inside a computer-generated 3D environment, using a head-mounted display, controllers and motion tracking. It is used in education for:
- Science and medicine: virtual dissection and anatomy, surgical simulation, chemistry and physics labs where experiments are dangerous or costly.
- Engineering and technical training: operating machinery, flight and driving simulators, circuit and construction practice.
- History and geography: virtual field trips to ancient sites, other countries, space or the human cell.
- Language and soft skills: immersive conversation practice, public speaking, and therapy and special-needs education.
- Remote and distance learning: shared virtual classrooms for students who cannot attend physically.
How VR enhances engagement and learning outcomes
- Immersion and presence: the learner experiences the content rather than just reading about it, which holds attention and reduces distraction.
- Learning by doing: hands-on practice in a safe place; mistakes cost nothing and can be repeated.
- Visualising abstract concepts: molecules, geometry, planetary motion and the like can be seen in 3D and manipulated, which aids understanding.
- Better retention: experiential, multi-sensory learning improves memory and recall compared with passive lectures.
- Motivation and interactivity: game-like activities and instant feedback raise interest.
- Accessibility and cost: expensive or unreachable facilities (labs, field sites) become available to many students.
Limitations: cost of equipment, motion sickness, need for content creation and teacher training, and limited access in low-resource schools.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2082 · 5 marks
Write short notes on:
a. Lighting in OpenGL
b. Orthographic projection
Answer
(a) Lighting in OpenGL
OpenGL uses a local illumination model: the colour of each vertex (or fragment) is computed from the light sources, the material of the surface and the surface normal. Lighting is switched on with glEnable(GL_LIGHTING) and each light with glEnable(GL_LIGHT0).
The final colour is the sum of four components:
- Ambient light: uniform background light that reaches every surface equally, so no surface is completely black.
- Diffuse light: scattered equally in all directions from a rough surface. Its intensity depends on the angle between the surface normal and the light direction :
- Specular light: the bright highlight on shiny surfaces, depending on the viewer direction and the reflection vector : where is the shininess exponent.
- Emission: light given out by the object itself.
Light properties are set with glLightfv(GL_LIGHT0, GL_AMBIENT / GL_DIFFUSE / GL_SPECULAR / GL_POSITION, values). Material properties are set with glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, ...) and glMaterialf(GL_FRONT, GL_SHININESS, ...). Correct normals must be supplied with glNormal3f(). Shading is chosen by glShadeModel(GL_FLAT) or GL_SMOOTH (Gouraud shading). Lights can be directional (position with ), point lights () or spotlights.
(b) Orthographic projection
Orthographic (parallel) projection projects points onto the view plane along lines parallel to the viewing direction, which is perpendicular to the plane. Projectors never converge, so there is no perspective foreshortening: size does not change with distance, and parallel lines stay parallel and true lengths and angles are preserved on faces parallel to the plane. It is used in engineering and architectural drawings (plan, front and side views).
For projection onto the plane :
The view volume is a rectangular box. In OpenGL it is set with glOrtho(left, right, bottom, top, near, far) (or gluOrtho2D for 2D), which maps the box to the canonical cube :
Its drawback is that it looks less realistic than perspective projection because depth cues are lost.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
Questions from TU BSc CSIT 2075 Third Semester Numerical Method (TU IOST board exam, 2075), TU BSc CSIT 2077 Third Semester Numerical Method (TU IOST board exam, 2077), TU BSc CSIT 2078 Third Semester Numerical Method (TU IOST board exam, 2078), TU BSc CSIT 2079 Third Semester Numerical Method (TU IOST board exam, 2079), TU BSc CSIT 2080 Third Semester Numerical Method (TU IOST board exam, 2080), TU BSc CSIT 2081 Third Semester Numerical Method (TU IOST board exam, 2081), TU BSc CSIT 2075 Third Semester Computer Architecture (TU IOST board exam, 2075), TU BSc CSIT 2077 Third Semester Computer Architecture (TU IOST board exam, 2077), TU BSc CSIT 2078 Third Semester Computer Architecture (TU IOST board exam, 2078), TU BSc CSIT 2079 Third Semester Computer Architecture (TU IOST board exam, 2079), TU BSc CSIT 2080 Third Semester Computer Architecture (TU IOST board exam, 2080), TU BSc CSIT 2081 Third Semester Computer Architecture (TU IOST board exam, 2081), TU BSc CSIT 2075 Third Semester Computer Graphics (TU IOST board exam, 2075), TU BSc CSIT 2077 Third Semester Computer Graphics (TU IOST board exam, 2077), TU BSc CSIT 2078 Third Semester Computer Graphics (TU IOST board exam, 2078), TU BSc CSIT 2079 Third Semester Computer Graphics (TU IOST board exam, 2079), TU BSc CSIT 2080 Third Semester Computer Graphics (TU IOST board exam, 2080), TU BSc CSIT 2081 Third Semester Computer Graphics (TU IOST board exam, 2081), TU BSc CSIT 2082 Third Semester Computer Graphics (TU IOST board exam, 2082), TU BSc CSIT 2074 Third Semester Data Structures and Algorithms (TU IOST board exam, 2074), TU BSc CSIT 2075 Third Semester Data Structures and Algorithms (TU IOST board exam, 2075), TU BSc CSIT 2077 Third Semester Data Structures and Algorithms (TU IOST board exam, 2077), TU BSc CSIT 2078 Third Semester Data Structures and Algorithms (TU IOST board exam, 2078), TU BSc CSIT 2079 Third Semester Data Structures and Algorithms (TU IOST board exam, 2079), TU BSc CSIT 2080 Third Semester Data Structures and Algorithms (TU IOST board exam, 2080), TU BSc CSIT 2081 Third Semester Data Structures and Algorithms (TU IOST board exam, 2081), TU BSc CSIT 2075 Third Semester Statistics II (TU IOST board exam, 2075), TU BSc CSIT 2077 Third Semester Statistics II (TU IOST board exam, 2077), TU BSc CSIT 2078 Third Semester Statistics II (TU IOST board exam, 2078), TU BSc CSIT 2079 Third Semester Statistics II (TU IOST board exam, 2079), TU BSc CSIT 2080 Third Semester Statistics II (TU IOST board exam, 2080), TU BSc CSIT 2081 Third Semester Statistics II (TU IOST board exam, 2081) and TU BSc CSIT 2082 Third Semester Statistics II (TU IOST board exam, 2082). Answers are written for this site; check them against your class notes.