0% found this document useful (0 votes)
20 views

Computer Graphics PYQs

Uploaded by

muzamilaslam
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Computer Graphics PYQs

Uploaded by

muzamilaslam
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Previous Year Questions (PYQs) on Computer Graphics

1. What is Computer Graphics? Explain its applications.


Computer Graphics is a field of computer science that deals with generating images,
animations, and visual effects using computers. It involves creating visual content to
represent data, simulate real-world scenes, and enhance user interfaces.

Applications:
- Entertainment: Animation, gaming, and visual effects in movies.
- Education: Interactive educational software.
- Medical Imaging: Visualizing complex anatomy through 3D rendering.
- Simulation: Flight simulators and architectural visualization.
- Graphic Design: Designing logos, posters, and other media.

2. Describe the Digital Differential Analyzer (DDA) algorithm for line generation.
The DDA algorithm is an incremental method used for rasterizing lines between two points
in a grid. It calculates intermediate points along a line using floating-point arithmetic and
places pixels at these points.

Steps:
1. Initialize starting coordinates (x₀, y₀) and ending coordinates (x₁, y₁).
2. Calculate Δx = x₁ - x₀ and Δy = y₁ - y₀.
3. Determine the number of steps as the maximum of |Δx| or |Δy|.
4. Calculate increments x_increment = Δx / steps and y_increment = Δy / steps.
5. Starting from (x₀, y₀), repeatedly add increments to generate line points until reaching
(x₁, y₁).

3. Differentiate between Raster Scan and Random Scan display systems.


Feature | Raster Scan | Random Scan
------------------|-------------------------------|-------------------------------
Working | Scans pixels row-by-row | Draws images by drawing lines
Resolution | Fixed | Varies by object complexity
Image Storage | Frame buffer | Display list
Application | Suitable for complex images | Best for line art/vector graphics
Examples | Television screens | Oscilloscopes

4. Explain the Cohen-Sutherland Line Clipping algorithm.


The Cohen-Sutherland Line Clipping algorithm clips a line segment within a rectangular
clipping window by categorizing the region codes of the line endpoints.

Steps:
1. Divide the Clipping Region into 9 regions with a 4-bit region code.
2. Assign Region Codes for each endpoint based on position relative to the clipping window.
3. Check for Trivial Accept/Reject:
- If both endpoints are 0000, the line is accepted.
- If logical AND of endpoints' codes is non-zero, the line is rejected.
4. Iteratively clip, moving endpoints into the window as needed.

5. Describe the Midpoint Circle Algorithm.


The Midpoint Circle Algorithm is used for rasterizing circles by exploiting symmetry.

Steps:
1. Initialize circle center (h, k), radius r, starting point (0, r).
2. Calculate initial decision parameter p₀ = 1 - r.
3. Plot 8 symmetrical points for each calculated point.
4. Update p based on condition. If p < 0, use p_next = p + 2x + 1; otherwise, use p_next = p +
2x - 2y + 1.
5. Repeat until x > y.

6. Explain the concept of 2D Transformation. Describe translation, rotation, and


scaling transformations.
2D transformations alter the position, orientation, or size of an object in a 2D plane. They
are applied using matrices.

Translation: Moves an object by adding values to x and y coordinates.


Rotation: Rotates around origin by angle θ.
Scaling: Changes size by multiplying coordinates by scaling factors sx and sy.

7. What are Bezier Curves? Explain with a formula.


Bezier Curves are parametric curves commonly used for modeling smooth curves.

For a cubic Bezier curve with control points (P₀, P₁, P₂, P₃):
P(t) = (1 - t)³P₀ + 3t(1 - t)²P₁ + 3t²(1 - t)P₂ + t³P₃, where t ∈ [0, 1]

8. Describe Z-buffering for hidden surface removal.


Z-buffering manages depth information to perform hidden surface removal in 3D graphics.

For each pixel, Z-values are compared. If the new Z-value is less than the current buffer, the
color and Z-buffer are updated; otherwise, the pixel is discarded.

9. What is 3D Viewing? Explain the concept of projection.


3D Viewing renders a 3D scene onto a 2D display. Projection types:

- Orthographic Projection: Projects along parallel lines; used in technical drawings.


- Perspective Projection: Projects along lines converging at a vanishing point, for realism.
10. Explain the concept of shading models in computer graphics.
Shading models simulate light effects on surfaces.

- Flat Shading: Single color per polygon; fast but less realistic.
- Gouraud Shading: Interpolates colors across vertices for gradients.
- Phong Shading: Interpolates normals for smoother highlights, offering better quality.

You might also like