Unit 1 of 4 · M.Sc IT Sem 3

Unit 1: Display technologies and 2D primitives

Computer Graphics notes · PTU syllabus (PGCA1919)

3 min read12 topics10 exam questions
On this page
  1. Unit summary
  2. Applications of computer graphics
  3. Input devices
  4. CRT and video basics
  5. Raster scan and random scan displays
  6. Storage tube displays
  7. LCD and LED displays
  8. Colour models: RGB and CMY
  9. Scan conversion of a point
  10. Line drawing: DDA algorithm
  11. Bresenham's line algorithm
  12. Circle drawing: Bresenham's and midpoint algorithms
  13. Ellipse drawing: midpoint algorithm
  14. Key terms
  15. Quick revision
  16. Important questions

Unit summary

Computer graphics turns data and models into pictures on screens. This unit covers applications, input and output devices, storage tube, raster scan, random scan, LCD and LED displays, CRT and video basics, the RGB and CMY colour models, and scan conversion of points, lines (DDA and Bresenham), circles (Bresenham and midpoint) and ellipses.

After this unit you can

  • Describe applications and graphics input and output devices
  • Explain CRT, raster, random scan, storage tube, LCD and LED displays
  • Explain the RGB and CMY colour models
  • Scan-convert points, lines, circles and ellipses

PTU syllabus topics

  • Computer graphics applications
  • I/O devices
  • storage tube/raster scan/random scan/LCD/LED displays
  • CRT and video basics
  • color models (RGB, CMY)
  • scan conversion of points
  • lines (DDA, Bresenham's algorithm)
  • circles (Bresenham's and midpoint algorithms) and ellipses
ComparisonRaster vs random scan displays
Raster scan
Random scan

Draws

Every pixel row by row

Lines directly

Memory

Frame buffer

Display list

Good for

Realistic shaded scenes

Line drawings

Refresh

Fixed, e.g. 60 Hz

Depends on picture complexity

1

Topic 1

Applications of computer graphics

ClassificationApplications
Computer graphics
  • Computer-aided design

    Buildings, cars, circuits

  • Presentation graphics

    Charts and graphs for reports

  • Entertainment

    Films, animation, video games

  • Education and training

    Simulators, scientific visualisation

  • Image processing

    Medical scans, satellite images

  • Graphical user interfaces

    Windows, icons, menus

  • Virtual and augmented reality

    Immersive environments

2

Topic 2

Input devices

Key termsGraphics input devices
Light pen
Pen-shaped device detecting light from a CRT screen to select or draw
Graphics tablet (digitiser)
Flat surface and stylus giving precise coordinates — design and signatures
Joystick
Lever controlling direction and speed — games, simulators
Trackball
Ball rotated by hand to move the cursor — space-saving
Digitiser
Converts drawings or maps into digital coordinates
Scanner
Converts printed images and text into digital images (with OCR for text)
Others
Mouse, touch screen, data glove, voice input
3

Topic 3

CRT and video basics

ProcessWorking of a CRT
  1. 1

    Heated cathode (electron gun) emits electrons

  2. 2

    Control grid sets beam intensity

  3. 3

    Focusing system narrows the beam

  4. 4

    Deflection plates or coils steer the beam

  5. 5

    Beam strikes phosphor-coated screen

  6. 6

    Phosphor glows to form a spot (pixel)

  • Persistence: how long phosphor glows after the beam moves; refresh rate: how often the picture is redrawn (60 Hz or more avoids flicker); resolution: maximum number of points displayed without overlap.
  • Video basics: a raster image is a grid of pixels refreshed many times a second; resolution (e.g., 1920 × 1080), aspect ratio (16:9), refresh rate (60–144 Hz), colour depth (24 bits for 16.7 million colours) and frame buffer size define a display. Video signals moved from analog (VGA) to digital (HDMI, DisplayPort).
4

Topic 4

Raster scan and random scan displays

ComparisonRaster and random scan
Raster scan
Random scan (vector)

Drawing

Beam sweeps every row from top to bottom

Beam goes only where lines are drawn

Picture stored as

Intensity of every pixel in a frame buffer

Line-drawing commands in a display file

Resolution

Lower; jagged lines (aliasing)

High; smooth lines

Realism

Shaded, filled, realistic scenes

Line drawings only

Cost

Cheaper

Costlier

Example

TVs, monitors

Early CAD systems, plotters

Key formulasFrame buffer size
  • Memory

    Horizontal pixels × vertical pixels × bits per pixel ÷ 8 bytes

  • Example

    1024 × 768 × 24 ÷ 8 = 2,359,296 bytes ≈ 2.25 MB

  • Interlacing: odd lines drawn in one pass and even lines in the next, reducing flicker at low refresh rates.
5

Topic 5

Storage tube displays

  • A DVST stores the picture as a charge distribution on a storage grid behind the screen, so it needs no refresh.
  • Advantages: no refreshing, flicker-free, complex pictures at high resolution. Disadvantages: no colour, selective erasing impossible — the whole screen must be erased and redrawn; slow erasure.
6

Topic 6

LCD and LED displays

ComparisonFlat-panel displays
Type
Working

Plasma panel

Emissive

Gas between glass plates glows when cells are energised

LED and OLED

Emissive

Diodes (or organic layers) emit light at each pixel; OLED needs no backlight

LCD

Non-emissive

Liquid crystals twist polarised light from a backlight; active-matrix (TFT) has a transistor per pixel

  • Flat panels are thinner, lighter and use less power than CRTs, and have replaced them in almost all uses.
7

Topic 7

Colour models: RGB and CMY

ComparisonRGB and CMY
RGB
CMY

Type

Additive — light is added

Subtractive — ink absorbs light

Primaries

Red, green, blue

Cyan, magenta, yellow

Black and white

Black (0,0,0); white (1,1,1)

White (0,0,0); black (1,1,1)

Used in

Monitors, cameras, projectors

Printers (CMYK adds black ink)

Key formulasConversion
  • RGB to CMY

    C = 1 − R, M = 1 − G, Y = 1 − B

  • Example

    Orange RGB (1, 0.5, 0) → CMY (0, 0.5, 1)

8

Topic 8

Scan conversion of a point

  • A point (x, y) with real coordinates is displayed by turning on the nearest pixel — (round(x), round(y)) — with putpixel. All other primitives are built from point plotting.
9

Topic 9

Line drawing: DDA algorithm

Key formulasLine equations
  • Slope–intercept form

    y = m x + c, where m = (y2 − y1) ÷ (x2 − x1)

  • Direct method

    For each x, compute y = m x + c and round — needs floating-point multiplication

  • DDA increments

    steps = max(abs(Δx), abs(Δy)); x increment = Δx ÷ steps; y increment = Δy ÷ steps

ProcessDDA algorithm
  1. 1Read endpoints (x1, y1) and (x2, y2)
  2. 2Compute Δx, Δy and steps
  3. 3Compute x and y increments
  4. 4Plot (round(x), round(y))
  5. 5Add increments and repeat steps times

Example

Line from (2, 3) to (8, 6): Δx = 6, Δy = 3, steps = 6, x increment 1, y increment 0.5. Points: (2,3), (3,3.5→4), (4,4), (5,4.5→5), (6,5), (7,5.5→6), (8,6).

  • DDA: simpler than the direct method, but uses floating-point addition and rounding, so errors accumulate.
10

Topic 10

Bresenham's line algorithm

  • Uses only integer addition and subtraction; at each step chooses between two candidate pixels using a decision parameter.
Key formulasBresenham line (0 < m < 1)
  • Initial decision parameter

    p0 = 2Δy − Δx

  • If pk < 0

    Next pixel (xk + 1, yk); pk+1 = pk + 2Δy

  • If pk ≥ 0

    Next pixel (xk + 1, yk + 1); pk+1 = pk + 2Δy − 2Δx

  • Derivation outline: at x = xk + 1 the true y is m(xk + 1) + c. Distances to the two candidates are d1 = y − yk and d2 = (yk + 1) − y. pk = Δx (d1 − d2) = 2Δy·xk − 2Δx·yk + constant has the same sign as d1 − d2, so its sign picks the nearer pixel; subtracting pk from pk+1 gives the update rules above.

Example

Line (20, 10) to (30, 18): Δx = 10, Δy = 8, p0 = 6. Pixels: (21,11) p = 2; (22,12) p = −2; (23,12) p = 14; (24,13) p = 10; (25,14) p = 6; (26,15) p = 2; (27,16) p = −2; (28,16) p = 14; (29,17) p = 10; (30,18).

11

Topic 11

Circle drawing: Bresenham's and midpoint algorithms

Key formulasMidpoint circle algorithm
  • Start

    (0, r); p0 = 1 − r (or 5/4 − r)

  • If pk < 0

    Next (xk + 1, yk); pk+1 = pk + 2xk+1 + 1

  • Else

    Next (xk + 1, yk − 1); pk+1 = pk + 2xk+1 + 1 − 2yk+1

  • Stop

    When x ≥ y

  • Derivation idea: f(x, y) = x² + y² − r² is negative inside the circle, zero on it and positive outside. Evaluate f at the midpoint (xk + 1, yk − ½) between the two candidate pixels; its sign tells which pixel is closer.

Example

r = 10: p0 = −9 → (1,10) p = −6 → (2,10) p = −1 → (3,10) p = 6 → (4,9) p = −3 → (5,9) p = 8 → (6,8) p = 5 → (7,7), and the octant is complete.

  • Bresenham's circle: d0 = 3 − 2r; if d < 0 then d = d + 4x + 6, else d = d + 4(x − y) + 10 and y decreases.
12

Topic 12

Ellipse drawing: midpoint algorithm

  • Midpoint (Bresenham) ellipse algorithm: uses four-way symmetry and divides the first quadrant into two regions — region 1 where the slope magnitude is less than 1 (step in x) and region 2 where it is greater than 1 (step in y).
Key formulasMidpoint ellipse
  • Region 1 start

    (0, ry); p1 = ry² − rx² ry + rx²/4

  • Region 1 update

    If p1 < 0: p1 = p1 + 2ry² x + ry²; else y decreases and p1 = p1 + 2ry² x − 2rx² y + ry²

  • Switch to region 2

    When 2ry² x ≥ 2rx² y

  • Region 2

    Step y down; decision p2 chooses whether x increases

Key terms

Raster scan
Display that sweeps the beam row by row through every pixel
Frame buffer
Memory holding the colour of every pixel
Additive colour model
RGB, mixing light
Scan conversion
Converting primitives into pixels
Decision parameter
Integer test choosing the next pixel

Quick revision

  • Applications; light pen, tablet, joystick, trackball, scanner.
  • CRT working; resolution, refresh, colour depth; raster vs random scan; DVST; LCD, LED, OLED.
  • RGB additive, CMY subtractive; C = 1 − R.
  • DDA increments; Bresenham p0 = 2Δy − Δx.
  • Midpoint circle p0 = 1 − r; Bresenham circle d0 = 3 − 2r; midpoint ellipse with two regions.

Important exam questions

Practice questions written to the PTU exam pattern for this unit's syllabus: short answers (Section A style) and long answers (Sections B and C style).

Short-answer questions

  1. Q1.Distinguish raster and random scan displays.
  2. Q2.How does an LCD produce an image?
  3. Q3.Convert RGB (0.2, 0.4, 1) to CMY.
  4. Q4.State one advantage of Bresenham's algorithm over DDA.
  5. Q5.What is eight-way symmetry?
  6. Q6.Why does the ellipse algorithm use two regions?

Long-answer questions

  1. Q1.Explain display devices: CRT, raster, random scan, storage tube, LCD and LED.
  2. Q2.Explain the DDA and Bresenham's line algorithms with an example.
  3. Q3.Explain the midpoint circle algorithm with an example.
  4. Q4.Explain the midpoint ellipse algorithm.

Stuck on this unit?

Message SBS on WhatsApp for help with Computer Graphics, or to ask about studying M.Sc IT at Synetic.

WhatsApp us