Computer Graphics Notes
Subject Overview
Computer Graphics covers display technologies and 2D primitives (line, circle and ellipse scan-conversion algorithms), 2D transformations and viewing, clipping and filling techniques, and 3D object representation and rendering including visible-surface determination and shading models like Phong's and Gouraud shading. A 4-credit core theory paper.
Subject at a glance
4
Units
29
Topics
4
Credits
4
Infographics
Unit-wise Syllabus
4 units — open any unit for detailed topic-wise notes, diagrams and important exam questions
- 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
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
Study guide
This unit covers applications, I/O devices, display technologies (storage tube, raster scan, random scan, LCD, LED), colour models and scan conversion of points, lines (DDA, Bresenham), circles (Bresenham, midpoint) and ellipses. Practise Bresenham's line and midpoint circle algorithms numerically.
- Window-to-viewport transformation
- scaling
- translation
- rotation
- reflection
- shear
- homogeneous coordinates
- composite transformations
Translation
[1 0 tx; 0 1 ty; 0 0 1]
Scaling
[sx 0 0; 0 sy 0; 0 0 1]
Rotation
[cosθ −sinθ 0; sinθ cosθ 0; 0 0 1]
Composite
Multiply matrices right to left in order of application
Study guide
You study window-to-viewport transformation, scaling, translation, rotation, reflection, shear, homogeneous coordinates and composite transformations. Express every transformation as a matrix and multiply in the correct order.
- Point clipping
- line clipping (Cohen-Sutherland, Liang-Barsky)
- polygon and text clipping
- boundary fill and flood fill algorithms
Both endpoints 0000
Fully inside
Accept the line
Logical AND of codes ≠ 0000
Fully outside on one side
Reject the line
Otherwise
Partly inside
Clip at a boundary and repeat
Study guide
You study point, line (Cohen-Sutherland, Liang-Barsky), polygon and text clipping and boundary and flood fill. Trace clipping region codes by hand.
- 3D transformations
- viewing pipeline and coordinates
- parallel and perspective projections
- visible-surface determination (back-face removal, z-buffer, scan-line, painter's algorithm, area subdivision)
- illumination and shading models
- ray tracing
- ambient/specular/diffuse reflection
- Phong's model
- Gouraud shading
Back-face removal
Drop faces pointing away
Fast; convex objects only
Z-buffer
Keep nearest depth per pixel
Simple; needs depth memory
Painter's algorithm
Draw far to near
Fails on cyclic overlaps
Ray tracing
Trace rays from the eye
Realistic but slow
Study guide
You study 3D transformations, the viewing pipeline, parallel and perspective projections, visible-surface methods (back-face, z-buffer, scan-line, painter's, area subdivision), illumination and shading (ambient, diffuse, specular, Phong, Gouraud) and ray tracing. Understand the difference between Gouraud and Phong shading.
Why Computer Graphics Matters
Computer graphics supports games, AR/VR, animation, simulation and visualisation, and the mathematics of transformations also appears in robotics and vision.
How to Prepare for Computer Graphics
- Practise algorithms and transformation matrices numerically.
- Implement key algorithms in code.
- Revise matrices and coordinate geometry.
Computer Graphics: Frequently Asked Questions
What is a z-buffer?
A z-buffer stores the depth of each pixel so that the nearest surface is displayed, solving the visible-surface problem.
