CSC426 Computer Graphics Notes
CSC426 Computer Graphics Notes
COMPUTER GRAPHICS
Definition
Computer Graphics is the branch of computer science that deals with creating, manipulating, storing, and
displaying visual images and pictures using a computer. It covers both the hardware (screens, printers)
and software (programs, algorithms) used to produce visual output.
■ Simple definition: Computer Graphics = Using computers to create and show pictures, drawings, and visual
effects.
1960 Ivan Sutherland created Sketchpad — the first interactive graphics program
Page 2
CSC 426 – Computer Graphics Comprehensive Study Notes
EXAM QUESTIONS
Q1: Define Computer Graphics.
Q2: State five applications of Computer Graphics.
Page 3
CSC 426 – Computer Graphics Comprehensive Study Notes
Career Description
Graphic Designer Creates logos, flyers, posters for print and digital media.
Animator Produces 2D/3D animation for movies, TV, games, and ads.
UI/UX Designer Designs the look and user experience of apps and websites.
Motion Graphics Designer Creates animated text and graphics for video content.
CAD Designer Technical drawings for buildings and products using AutoCAD.
VFX Artist Creates special effects for films that are impossible to film.
Multimedia Specialist Combines text, images, audio, and video into interactive media.
Challenge Explanation
Cost of Hardware High-end GPUs and professional monitors are very expensive.
Cost of Software Adobe CC, Autodesk and similar tools require costly licenses.
Power Consumption Graphics workstations and gaming rigs use a lot of electricity.
Learning Curve Tools like Blender and AutoCAD take significant time to master.
Page 4
CSC 426 – Computer Graphics Comprehensive Study Notes
A Cathode Ray Tube (CRT) is an older display technology that uses an electron gun to fire electrons at a
phosphor-coated screen to produce images. CRT monitors were standard from the 1950s to the early
2000s.
Components of CRT
• Electron Gun – Produces and fires a beam of electrons.
• Deflection Plates – Steer the electron beam left/right and up/down.
• Phosphor Screen – Glows when hit by electrons, creating visible light.
• Vacuum Tube (Glass Envelope) – Sealed glass with no air inside.
• Shadow Mask / Aperture Grille – Separates red, green, and blue phosphor dots.
Working Principle
A heated cathode releases electrons → electrons are accelerated by high voltage → deflection plates
steer the beam across the screen → the beam hits the phosphor coating which glows → the beam scans
left-to-right and top-to-bottom, refreshing 60+ times per second.
A Raster Scan Display divides the screen into a grid of pixels. The electron beam scans row by row (left
to right, top to bottom) to illuminate each pixel. This is the technology in modern TVs, monitors, and
phones.
• Refresh Buffer (Frame Buffer): Memory storing every pixel's colour for the current image.
• Pixels are arranged in a 2D grid; more pixels = higher resolution.
Page 5
CSC 426 – Computer Graphics Comprehensive Study Notes
A Random Scan (Vector) Display moves the electron beam only to specific positions needed for the
drawing — like a pen drawing lines — instead of scanning every row.
A Plasma Display uses tiny cells of ionised gas (plasma). When electricity passes through the cells, they
emit UV light, which causes a phosphor coating to produce red, green, or blue visible light.
Advantages Disadvantages
An LCD (Liquid Crystal Display) uses liquid crystals to control how much backlight passes through each
pixel. Liquid crystals twist or untwist under electric fields to block or allow light.
Advantages Disadvantages
Page 6
CSC 426 – Computer Graphics Comprehensive Study Notes
Advantages Disadvantages
Sharp image quality Blacks appear as dark grey, not true black
An LED Display is essentially an LCD with LED backlighting. OLED displays have each pixel produce its
own light — giving true black and infinite contrast.
Advantages Disadvantages
Page 7
CSC 426 – Computer Graphics Comprehensive Study Notes
Aspect Ratio is the proportional relationship between the width and height of a screen. Formula: Aspect
Ratio = Width : Height
3.2 Resolution
Resolution = total number of pixels a screen can display (Width × Height). Higher resolution = sharper,
more detailed image.
Refresh Rate is how many times per second the screen redraws the image. Measured in Hertz (Hz).
Higher Hz = smoother motion.
Page 8
CSC 426 – Computer Graphics Comprehensive Study Notes
Interlaced (i): Refreshes odd rows then even rows alternately. Progressive (p): All rows drawn
sequentially — smoother and clearer.
A Frame Buffer is memory that stores the colour values of every pixel on screen. The display hardware
reads it continuously to know what to show.
Memory Requirement Formula: Memory = Width × Height × Bits per pixel
Example: Full HD (1920×1080) at 24-bit colour = 1920 × 1080 × 24 ≈ 6 MB per frame.
3.5 Pixels
A pixel (picture element) is the smallest unit of a digital image. Each pixel has a specific colour. Millions of
pixels together form a complete image.
• Pixel coordinates: (x, y) — x is the column, y is the row. (0,0) = top-left corner.
• PPI (Pixels Per Inch): higher PPI = more pixels per inch = sharper display.
• Apple Retina Display: 264+ PPI for very sharp, smooth text.
Page 9
CSC 426 – Computer Graphics Comprehensive Study Notes
4.1 Mouse
A mouse is a pointing device for moving the cursor and selecting objects on screen. Types: Mechanical,
Optical, Wireless, 3D Mouse.
A light pen detects light from a CRT screen when pressed against it. The photodetector senses the
electron beam timing and calculates position. Only works with CRT screens, not modern LCD/LED.
4.3 Joystick
A joystick has a vertical stick moved in multiple directions to control movement on screen. Used in
games, flight simulators, and robotics.
4.4 Trackball
A trackball is like an upside-down mouse. The user rolls a large ball with their fingers while the device
stays still. Used in CAD workstations and as accessibility devices.
4.5 Scanner
A scanner converts physical documents or photos into digital image files. Types: Flatbed, Drum,
Handheld, 3D Scanner.
A graphics tablet is a flat surface with a stylus. Artists draw on the surface and movements appear on
screen. Used for digital art, photo editing, and animation.
Resistive Two layers pressed together at touch point; detects pressure ATMs, kiosks
SAW Touch disrupts ultrasonic waves across the surface Industrial displays
Page 10
CSC 426 – Computer Graphics Comprehensive Study Notes
Category Types
Impact Printers
Line Printer
Prints one full line at a time using a rotating drum or chain. Very fast for large volumes (bank statements).
Poor quality; cannot print graphics.
Non-Impact Printers
Inkjet Printer
Tiny nozzles spray microscopic ink drops onto paper. Good colour quality; quiet; cheap to buy. Ink
cartridges are expensive; ink can smear; nozzles can clog.
Page 11
CSC 426 – Computer Graphics Comprehensive Study Notes
5.2 Plotters
A plotter uses pens to draw continuous lines on paper, producing large, precise diagrams.
Flatbed Plotter Paper held flat; pen arm moves X/Y Small technical drawings
Drum Plotter Paper on rotating drum; pen moves left/right Large engineering drawings
Page 12
CSC 426 – Computer Graphics Comprehensive Study Notes
RGB is an additive colour model used by screens. Adding Red + Green + Blue light at full intensity =
White. Absence of all light = Black. Each channel: 0–255. Total colours = 256 × 256 × 256 = 16,777,216.
• Red + Green = Yellow
• Green + Blue = Cyan
• Red + Blue = Magenta
• Red + Green + Blue = White
■ RGB is used in monitors, phones, web design, and digital photography.
CMYK is a subtractive colour model used in printing. Inks absorb (subtract) certain light wavelengths from
white paper. K (Black) is added because CMY together produce muddy dark brown, not true black.
Page 13
CSC 426 – Computer Graphics Comprehensive Study Notes
Page 14
CSC 426 – Computer Graphics Comprehensive Study Notes
A Quad Tree is a tree structure where each node has exactly four children. It partitions 2D space by
repeatedly dividing a region into four equal quadrants (NW, NE, SW, SE) until each region is uniform.
Construction
• Start with the full 2D image as the root.
• If a region is uniform (all one colour) → it becomes a leaf node (no subdivision).
• If not uniform → split into 4 equal quadrants and repeat.
Spatial indexing Saves memory for sparse images Less efficient for dense detail
7.2 Octree
An Octree is the 3D equivalent of a Quad Tree. Each node has exactly eight children. It partitions 3D
space by dividing a cube into eight equal sub-cubes (octants).
• Root = entire 3D space (cube).
• If cube is uniform → leaf node (stop subdividing).
• If not uniform → divide into 8 octants and repeat.
• Applications: 3D modelling, volume rendering (MRI/CT), game collision detection.
The block representation describes how 3D space is divided into blocks (voxels) at different levels of
detail.
• Full block: entirely inside the object (solid).
• Empty block: entirely outside the object (void).
• Partial block: partly inside → subdivide further.
• Used in solid modelling, ray tracing, and medical volume data.
Page 15
CSC 426 – Computer Graphics Comprehensive Study Notes
The Cartesian coordinate system uses two perpendicular number lines to define any point in 2D space:
the X-axis (horizontal) and Y-axis (vertical). The origin (0,0) is where they intersect. Any point is
described as (x, y).
8.2 Quadrants
Line Two endpoints: (x1,y1) and (x2,y2) Scan converted using DDA/Bresenham
Circle Centre (cx,cy) and radius r All points at distance r from centre
Page 16
CSC 426 – Computer Graphics Comprehensive Study Notes
3D graphics represents geometric data in three dimensions (X, Y, Z) to create the illusion of solid objects
and real environments on a flat screen. 2D images cannot convey depth or volume; 3D graphics fill that
gap.
Three axes: X-axis (Left–Right), Y-axis (Up–Down), Z-axis (Forward–Backward / Depth). Any 3D point:
(x, y, z).
Wireframe Shows only edges/lines — like a wire cage Early CAD, quick previews
Engineering simulation,
Solid Full volume including implied interior
manufacturing
Dimensions Width & Height (X, Y) Width, Height & Depth (X, Y, Z)
Page 17
CSC 426 – Computer Graphics Comprehensive Study Notes
The DDA (Digital Differential Analyser) calculates intermediate pixel positions along a line using the
slope, incrementally stepping from one endpoint to the other.
Steps
• Calculate: delta_x = x2 - x1, delta_y = y2 - y1
• Steps = max(|delta_x|, |delta_y|)
• x_inc = delta_x / Steps, y_inc = delta_y / Steps
• Start at (x1, y1). Plot Round(x), Round(y).
• Add increments: x = x + x_inc, y = y + y_inc. Repeat for all Steps.
0 2 3.00 (2, 3)
1 3 3.75 (3, 4)
2 4 4.50 (4, 5)
3 5 5.25 (5, 5)
4 6 6.00 (6, 6)
Advantages Disadvantages
Bresenham's algorithm uses only integer arithmetic — no floating point. At each step a decision
parameter (d) decides whether the next pixel is directly horizontal or diagonal. Much faster than DDA.
Page 18
CSC 426 – Computer Graphics Comprehensive Study Notes
Step x y d Action
Advantages Disadvantages
Uses 8-fold symmetry of circles. Calculates points in one octant and reflects them to all 8 octants. Uses a
decision parameter (p) to choose between two candidate pixels.
x y p Action
Page 19
CSC 426 – Computer Graphics Comprehensive Study Notes
11.1 Translation
Translation moves every point of an object by a fixed amount (tx, ty) without changing its shape or size.
Formula: x' = x + tx y' = y + ty
Example: Translate (3, 4) by tx=2, ty=3 → New point: (5, 7)
11.2 Rotation
11.3 Scaling
11.4 Reflection
11.5 Shearing
Shearing tilts an object — like pushing the top of a rectangle sideways to make a parallelogram.
Page 20
CSC 426 – Computer Graphics Comprehensive Study Notes
A composite transformation combines multiple transformations into a single matrix by multiplying them
together. Example: Rotate then Scale then Translate → M = T3 × T2 × T1. Order matters! A × B ≠ B × A
in matrix multiplication.
Page 21
CSC 426 – Computer Graphics Comprehensive Study Notes
12.1 Windowing
A window is a rectangular area of the world coordinate space that the user wants to view. Defined by
Xmin, Xmax, Ymin, Ymax. Think of it as the frame of a window you look through.
12.2 Viewport
A viewport is the rectangular area on the screen where the window contents are displayed. The
window-to-viewport transformation maps world coordinates to screen coordinates:
Vx = Vxmin + (x - Wxmin) × (Vxmax - Vxmin) / (Wxmax - Wxmin)
Vy = Vymin + (y - Wymin) × (Vymax - Vymin) / (Wymax - Wymin)
12.3 Clipping
Clipping removes parts of objects outside the viewing window. Only portions inside the window are
rendered, improving performance.
Type Description
Line Clipping Find portion of a line inside the window; clip at boundaries.
Assigns a 4-bit region code to each endpoint based on its position relative to the window:
Bit 1: Left of window | Bit 2: Right | Bit 3: Below | Bit 4: Above
Condition Action
code1 AND code2 ≠ 0000 Both outside same region → reject line completely
Page 22
CSC 426 – Computer Graphics Comprehensive Study Notes
Uses parametric representation of a line: x = x1 + t·∆x, y = y1 + t·∆y (t ∈ [0,1]). Finds the range of t
values [t1, t2] where the line is inside the window, then clips to those values. More efficient than
Cohen-Sutherland — intersection points calculated only once.
Page 23
CSC 426 – Computer Graphics Comprehensive Study Notes
Adobe Photoshop
Category Features Applications
Layers & masks, photo retouching, filters, Photo editing, web mockups,
Raster image editor
compositing digital painting, advertising
CorelDRAW
Category Features Applications
Adobe Illustrator
Category Features Applications
Blender
Category Features Applications
Free 3D creation 3D modelling, rigging, animation, rendering, video Animated films, game assets,
suite editing architectural viz, VFX
AutoCAD
Category Features Applications
Architecture, mechanical
Precision CAD 2D drafting, 3D modelling, dimensions, industry
engineering, civil engineering,
software toolsets
manufacturing
Page 24
CSC 426 – Computer Graphics Comprehensive Study Notes
CAD software lets engineers design and test components virtually before
Engineering Design
production.
MRI/CT scans produce digital images; 3D organ models help surgeons plan
Medical Imaging
procedures.
Business Presentations Charts, graphs, and infographics make financial data easier to understand.
Animation 2D/3D animation for movies, TV shows, and advertisements (Disney, Pixar).
Gaming Real-time 3D graphics create interactive virtual worlds (Unity, Unreal Engine).
Advertising Motion graphics, 3D product renders, and striking visuals drive campaigns.
Virtual Reality (VR) Fully immersive virtual environments for gaming, training, tourism, and therapy.
Overlays digital content on the real world (Pokemon GO, IKEA app, surgical
Augmented Reality (AR)
AR).
Education Interactive simulations and virtual labs make complex subjects easier to learn.
Digital maps, satellite imagery, and terrain models for urban planning and
GIS
agriculture.
Page 25
CSC 426 – Computer Graphics Comprehensive Study Notes
Modul
Topic Key Concept
e
3 Screen Characteristics Aspect ratio, Resolution (VGA→8K), Refresh rate, Frame buffer
4 Input Devices Mouse, Light pen, Joystick, Trackball, Scanner, Tablet, Touch
End of CSC 426 – Computer Graphics Notes · Prepared for Academic Use · Study Well!
Page 26