0% found this document useful (0 votes)
10 views15 pages

Computer Graphics PDF

Computer graphics is the creation and manipulation of visual images using computers, with applications in entertainment, engineering, medical imaging, and scientific visualization. Key components include graphics hardware, software, and input devices, while techniques involve raster and vector scans, transformations, and rendering methods. Various algorithms, such as Bresenham's for line drawing and clipping techniques, are essential for efficient image processing and display.

Uploaded by

Nitin Bisht
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views15 pages

Computer Graphics PDF

Computer graphics is the creation and manipulation of visual images using computers, with applications in entertainment, engineering, medical imaging, and scientific visualization. Key components include graphics hardware, software, and input devices, while techniques involve raster and vector scans, transformations, and rendering methods. Various algorithms, such as Bresenham's for line drawing and clipping techniques, are essential for efficient image processing and display.

Uploaded by

Nitin Bisht
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Computer graphics

Section –“A”
1. What is Computer Graphics?
Computer Graphics involves creating, manipulating, and representing visual
images and animations using computers.
2. What is Computer Graphics? Explain the application of Computer
Graphics in several fields.
Computer Graphics is the study and creation of images using computers.
Applications include:
o Entertainment (movies, games)
o CAD for engineering
o Medical imaging
o Simulation and training
o Scientific visualization
3. What are the components of computer graphics?
Key components:
o Graphics hardware (monitor, GPU)
o Software (graphics APIs like OpenGL)
o Input devices (mouse, keyboard)
o Frame buffer
4. What is the difference between computer graphics and image
processing?
o Computer Graphics: creates images from models.
o Image Processing: enhances/modifies existing images.
5. What are the video display devices?
Examples include:
o CRT (Cathode Ray Tube)
o LCD (Liquid Crystal Display)
o LED (Light Emitting Diode)
o OLED (Organic LED)
6. What is Video Controller? Explain.
It is a part of graphics hardware that converts digital data to video signals for
display.
7. What is Pixel and Frame Buffer?
o Pixel: Smallest unit of an image on a screen.
o Frame Buffer: Memory storing pixel color values.
8. What is Flicking?
Flicking (Flicker) is the visual instability due to slow refresh rates of the
display.
9. What is the role of a frame buffer in raster method?
Stores pixel data that is converted to screen image in raster scan systems.
10.What is aspect ratio?
Ratio of screen width to height (e.g., 16:9).
11.Distinguish between pixel ratio and aspect ratio.
o Pixel ratio: width to height ratio of a single pixel.
o Aspect ratio: overall screen resolution ratio.
12.What is the difference between Raster image and Vector image?
o Raster: pixel-based (e.g., JPEG).
o Vector: geometry-based (e.g., SVG).
13.What is the difference between Raster and Random Scan?
o Raster: scans line-by-line (used in TVs).
o Random: draws line segments directly (vector displays).
14.What is output primitive?
Basic elements like points, lines, and polygons used to construct graphics.
15.What do you mean by scan conversion?
Process of converting geometric data to pixel representation.
16.What is Clipping? Name the different types of clipping.
Removing parts of graphics outside the display region. Types: point, line,
polygon, curve, text.
17.What is the concept of vanishing point?
In perspective projection, it's where parallel lines appear to converge.
18.Define convex and concave polygon.
o Convex: all interior angles < 180°
o Concave: at least one angle > 180°
19.What is refresh/frame buffer?
Memory that stores the image to be displayed on screen.
20.Define scaling, rotation, and translation transformations in 2D.
o Scaling: resize object.
o Rotation: rotate about an axis.
o Translation: shift object in space.
21.What is shear transformation?
Distorts the shape by shifting coordinates in a specific direction.
22.What do you mean transformation in computer graphics?
Changing position, size, or orientation of objects using matrix operations.
23.Explain 2D Translation with diagrams.
Moves object by adding translation factors (Tx, Ty) to coordinates.
(Diagram should show original and translated object)
24.What is 2D geometric transformation pipeline?
Sequence of transformations: modeling → world → viewing → device
coordinates.
25.Explain window-to-viewport transformation.
Maps coordinates from world (window) to screen (viewport) system using
scaling and translation.
26.Explain 3-D geometric primitives.
Basic 3D shapes: cubes, spheres, cylinders, cones.
27.What is Bezier Curve? Write the two characteristics of Bezier Curve.
Parametric curve defined by control points. Characteristics:
o Passes through first and last points
o Lies within convex hull of control points
28.List the properties of Bezier Curves.
o Easily controllable
o Smooth and continuous
o Defined by control points
o Always lies within convex hull
29.Discuss the advantages of B-Spline curves over Bezier curves.
o Local control (modifying one control point affects part of curve)
o Can represent complex shapes with fewer points
30.What do you understand by quadratic surfaces? Explain Sphere.
3D surfaces defined by quadratic equations.
Sphere: all points equidistant from a center point.
31.What are Hermite curves? State their characteristics.
Parametric curves defined by endpoints and tangents.
Characteristics: smooth, customizable curvature.
32.Explain important terms used in projection.
o View plane
o Center of projection
o Projectors
o Perspective depth
33.Explain different types of coherence.
o Spatial, temporal, object coherence used to optimize rendering.
34.What is Specular reflection?
Mirror-like reflection of light from a surface, creating highlights.
35.What is 3D viewing pipeline?
Stages: modeling → transformation → projection → clipping → viewport
mapping.
36.Explain perspective and parallel projection with differences.
o Perspective: objects appear smaller at distance.
o Parallel: retains object size; lines stay parallel.
37.Define and explain 3D transformations: translation, rotation, and
scaling.
o Translation: shifts in 3D space (Tx, Ty, Tz)
o Rotation: around X, Y, or Z axis
o Scaling: changes size (Sx, Sy, Sz)

Section –“B”

1. Explain Raster and Random Scan Display Systems.

Raster Scan:

 Works like a television.


 The screen is scanned line by line from top to bottom.
 Images are composed of pixels stored in a frame buffer.
 Suited for realistic images and color graphics.
 Refresh rate: ~60 to 75 Hz.

Random Scan:

 Also known as vector display.


 Electron beam directly draws lines between coordinates.
 Suited for line drawings and wireframes.
 Cannot display complex images like raster.
 Refresh rate: depends on the complexity of the image.

2. Explain the uses of computer graphics.

 Engineering and Design (CAD): Design of machines, architecture,


vehicles.
 Entertainment: Animation, films, games.
 Education and Training: Simulations for pilots, doctors, soldiers.
 Medical Imaging: MRI, CT scans visualization.
 Scientific Visualization: Weather models, molecular structures.
 Business: Graphs, charts for presentations and reports.

3. What do you understand by Shadow Mask CRT? Give its advantages and
disadvantages.

A Shadow Mask CRT is a type of color CRT that uses a metal screen with holes
(mask) in front of the phosphor-coated screen.

Advantages:

 Accurate color reproduction.


 Sharp image quality.

Disadvantages:

 Lower brightness.
 Higher power consumption.
 Heavier and bulkier.

4. Difference between Raster and Random Scan

Feature Raster Scan Random Scan


Drawing Method Scans screen line-by-line Draws lines from point to point
Image Type Pixel-based Line-based (vector)
Suitable For Realistic images Line drawings (CAD)
Refresh Memory Frame buffer Display list (instructions)

5. Digitize a Line from (10,12) to (15,15) using Bresenham’s Algorithm. List


line drawing algorithms.

Bresenham’s Algorithm steps:

 dx = 5, dy = 3
 Initial point: (10,12), slope = 0.6 < 1

Points Plotted:
(10,12), (11,13), (12,13), (13,14), (14,14), (15,15)

Line Drawing Algorithms:

 Digital Differential Analyzer (DDA)


 Bresenham’s Line Algorithm
 Midpoint Line Algorithm

6. Circle at (4,5), radius 4 – Bresenham’s Circle Algorithm

Use symmetry for plotting 8 points per calculation. Initial point (0,4):

Calculated Points (only first octant shown):


(4+0,5+4) = (4,9),
(4+1,5+4) = (5,9),
(4+2,5+3) = (6,8),
(4+3,5+2) = (7,7),
(4+4,5+0) = (8,5)

Use symmetry to get full circle.

7. Bresenham's for Line (1,2) to (7,6) in 10×10 Buffer

dx = 6, dy = 4 → Slope < 1
Start: (1,2)

Pixels Turned On:


(1,2), (2,3), (3,3), (4,4), (5,5), (6,5), (7,6)

8. Difference between Bresenham’s and DDA Algorithms

Feature DDA Algorithm Bresenham’s Algorithm


Accuracy Less (uses float values) More accurate (integers only)
Feature DDA Algorithm Bresenham’s Algorithm
Speed Slower Faster
Efficiency Less efficient More efficient
Complexity Simple to understand Slightly complex

9. Composite Transformations: (i) Translation (ii) Rotation

Translation Matrix:

T=[10tx01ty001]T = \begin{bmatrix} 1 & 0 & tx \\ 0 & 1 & ty \\ 0 & 0 & 1 \


end{bmatrix}

Rotation Matrix (θ):

R=[cos⁡θ−sin⁡θ0sin⁡θcos⁡θ0001]R = \begin{bmatrix} \cosθ & -\sinθ & 0 \\ \sinθ & \


cosθ & 0 \\ 0 & 0 & 1 \end{bmatrix}

Composite Transformation:
Apply translation then rotation by multiplying the matrices in order.

10. Compare between Window and Viewport

Term Window Viewport


Space User-defined coordinate system Device coordinate system
Purpose Area to be displayed Where the window is displayed
Units Abstract (world units) Pixels

11. Window-to-Viewport Transformation with Formula

Formula:

Xv=Xvmin+(Xw−Xwmin)(Xvmax−Xvmin)Xwmax−XwminX_v = X_{v_{min}}
+ \frac{(X_w - X_{w_{min}})(X_{v_{max}} - X_{v_{min}})}{X_{w_{max}} -
X_{w_{min}}} Yv= +(Yw−Ywmin)(Yvmax−Yvmin)Ywmax−YwminY_v =
Y_{v_{min}} + \frac{(Y_w - Y_{w_{min}})(Y_{v_{max}} - Y_{v_{min}})}
{Y_{w_{max}} - Y_{w_{min}}}
Example:

 Window: (10,10)-(110,110)
 Viewport: (0,0)-(200,200)
 Point: (60,60) → (100,100)

12. Transform Square ABCD with Translation and Scaling

 Original: A(0,0), B(3,0), C(3,3), D(0,3)


 Translate by (2,2): A'(2,2), B'(5,2), C'(5,5), D'(2,5)
 Scale: x by 1.5, y by 0.5
A"(3,1), B"(7.5,1), C"(7.5,2.5), D"(3,2.5)

13. Difference: Polygon vs Quadric Surface

Feature Polygon Quadric Surface


Type Flat 2D/3D surface Curved surface
Equation Linear equations Quadratic equations
Example Triangle, Hexagon Sphere, Cone, Ellipsoid

14. Hermite Curve and Its Uses

 Defined by endpoints and tangents.


 Equation uses Hermite basis matrix.
 Smooth transitions, local control.
Uses:
 Animation paths.
 Stroke rendering in drawing apps.

15. Polygon Rendering Techniques

 Flat Shading: One color per polygon.


 Gouraud Shading: Interpolates vertex colors.
 Phong Shading: Interpolates normals for lighting.
 Scanline Rendering: Fills polygons row-by-row.
16. Sutherland-Hodgeman Polygon Clipping Algorithm

Steps:

1. Clip polygon edge-by-edge against each window boundary.


2. For each edge, check if start and end are inside or outside.
3. Add visible vertices to output.

Example:
Clip square against a rectangular clip window → Output is smaller polygon inside
the window.

17. Cohen-Sutherland Line Clipping Algorithm

 Assigns 4-bit codes to endpoints.


 Use AND/OR operations to test visibility.
 Efficient for rectangular clipping.

Limitations:

 Does not handle non-rectangular clip windows.


 May require multiple iterations for clipping.

18. Clipping and Liang-Barsky Algorithm

Clipping:
Process of removing parts of primitives outside the viewport.

Liang-Barsky:

 Parametric form of line.


 Calculates intersection using inequalities.
 Faster than Cohen-Sutherland, fewer calculations.

Section--“C”
1 & 2. What is Cathode Ray Tube (CRT)? Explain its construction and working
with diagram, applications, advantages & disadvantages.

CRT (Cathode Ray Tube) is a display device used in older monitors and televisions. It
generates images by directing an electron beam onto a phosphorescent screen.

Construction:

 Electron Gun: Emits electrons.


 Control Grids: Focus and control the electron beam.
 Deflection Coils/Plates: Control the direction of the beam.
 Phosphor-coated Screen: Emits light when hit by electrons.

Working:

 Electrons are emitted by the heated cathode.


 Accelerated and focused into a beam.
 Deflected horizontally and vertically.
 Hits phosphor screen creating visible image.

Diagram:
+---------------------------+
| Phosphor Screen |
+-----------+--------------+
|
Electron Beam
|
+--------+--------+
| Control Grid |
+------------------+
| Electron Gun |
+------------------+
Applications:

 Televisions
 Oscilloscopes
 Old computer monitors

Advantages:

 Good color rendering


 Wide viewing angles

Disadvantages:

 Bulky and heavy


 High power consumption
 Image distortion over time
3. Short Notes on CRT, Vector Scan, and Random Scan

CRT:

Already covered above.

Vector Scan:

 Draws images using straight lines from one point to another.


 Also called calligraphic displays.

Advantages: Sharp lines, efficient for wireframes


Disadvantages: Not suitable for complex images

Random Scan:

 Directly controls the beam to draw images.


 Similar to vector scan but supports better hardware control.

Applications: CAD, simulators


Disadvantages: Costly hardware

4. Midpoint Circle Drawing Algorithm (Radius = 10, Center = Origin)

Algorithm Steps:

1. Start at (x=0, y=R)


2. Initial decision parameter:

p=1−Rp = 1 - R

3. For each x from 0 to y:


o If p<0p < 0: x=x+1x = x + 1, p=p+2x+1p = p + 2x + 1
o Else: y=y−1y = y - 1, x=x+1x = x + 1, p=p+2(x−y)+1p = p + 2(x - y) + 1

Example with Radius 10:

First few points:

 (0,10), (1,10), (2,9), (3,9), (4,9)


 ...
Use symmetry to plot all 8 octants.
5. Concept of Line and Bresenham's Algorithm

Line Drawing: Determines which pixels to turn on to form a close approximation of a line.

Bresenham’s Line Algorithm:

 Uses integer arithmetic for fast execution.


 Suitable for lines with slope between 0 and 1.

Steps:

1. Calculate dx, dy, and decision variable.


2. At each step, update x, y depending on the slope.

6 & 17. Find 3×3 Homogeneous Transformation Matrix for ABCD to A'B'C'D'

Given: A (20,10)

Assume square ABCD with side 10:


A (20,10), B (30 10), C (30,20), D (20,20)

Let’s say transformation involves:

 Translate by (-20, -10) to move A to origin.


 Rotate 90° counter-clockwise.
 Translate back to new position (e.g., A' at (30,30))

Combined Matrix (Translation * Rotation * Translation):


T=Tfinal⋅R⋅TinitialT = T_{final} \cdot R \cdot T_{initial}

You can manually calculate this matrix and apply to all points.

7. Window-to-Viewport Transformation & Multiple Windowing Issues

Transformation Formula:
Xv=Xvmin+(Xw−Xwmin)(Xvmax−Xvmin)Xwmax−XwminX_v = X_{v_{min}} + \frac{(X_w - X_{w_{min}})
(X_{v_{max}} - X_{v_{min}})}{X_{w_{max}} - X_{w_{min}}}

Same for Y-axis.


Issues:

 Overlapping windows
 Inconsistent coordinate mapping
 Performance overhead for managing multiple windows

8. Short Note on Window and Viewport

 Window: Logical area selected from world coordinates.


 Viewport: Physical area on the display device.

Used for zooming, panning, and clipping.

9 & 15. Cubic Bezier Curve with (1,1), (2,3), (4,4), (6,1)

Bezier Equation:
B(t)=(1−t)3P0+3(1−t)2tP1+3(1−t)t2P2+t3P3B(t) = (1-t)^3P_0 + 3(1-t)^2tP_1 + 3(1-t)t^2P_2 + t^3P_3

At t=0.5t = 0.5, plug in values for P₀ through P₃:

 Parametric midpoint = (3.125, 2.875)

Gradient (dy/dx):

Differentiate x(t) and y(t), then find:

dydx=dy/dtdx/dt=17\frac{dy}{dx} = \frac{dy/dt}{dx/dt} = \frac{1}{7}

10 & 16. Compare Bezier and B-spline Curves

Feature Bezier Curve B-Spline Curve

Control Points Influences entire curve Local control (affects small segment)

Flexibility Less flexible More flexible

Degree Depends on number of control points Defined independently

Uses Graphics, animation paths CAD, 3D modeling


11. Short Note on Polygon

A polygon is a closed shape defined by line segments.

 Convex: All interior angles < 180°


 Concave: At least one angle > 180°
 Applications: Filling, clipping, modeling

12. Transformation & Steps in 3D Transformation

Transformation: Changing position, orientation or size of an object.

Steps in 3D Transformation:

1. Translation: Move object


2. Scaling: Resize object
3. Rotation: Rotate about axis
4. Shearing: Shift by fixed amount
5. Composite Transformation: Combination

13 & 9(b). Cohen-Sutherland Line Clipping Algorithm with Example

Assign region codes (0000 to 1111) to endpoints.

Steps:

1. Check trivial acceptance or rejection.


2. If not, calculate intersection with window edge.
3. Replace endpoint, repeat.

Example: Line from (5,5) to (15,15) clipped within window (0,0)-(10,10).

14. Projection: Parallel vs Perspective

Parallel Projection:

 Projectors are parallel


 Size preserved
Perspective Projection:

 Projectors converge at a point


 Distant objects appear smaller

Diagram:

Parallel → |→→→
Perspective → \ | /

You might also like