Semester 5Year 3 · OddCore Subject★★★ Moderate
CS 504

Computer Graphics

Study of 2D/3D graphics, transformations, clipping, rendering algorithms, and graphics programming.

4Units
26Topics
4Credits
60hLecture hrs
100Max marks
Your Progress
0 / 26 topics
0% complete
Overview
🎯
Why it matters
Every game, every 3D app, every visual interface — graphics. From Unity to Unreal to WebGL, understanding transformations, rendering, and shaders is essential for game dev, AR/VR, simulations, and visualization.
💼
Placement relevance
Game development roles (Unity, Unreal). Graphics engineer at NVIDIA, AMD, Intel. AR/VR startups (high pay ₹25-40 LPA). Blender, Maya, 3D modeling pipelines. Growing with metaverse.
🔗
Prerequisites for
Game Development · AR/VR · Computer Vision · 3D Modeling · Simulation · Animation · GPU Programming
📚
Recommended books
Computer Graphics: Principles and Practice by Foley, van Dam · Computer Graphics by Donald Hearn and M. Pauline Baker · Interactive Computer Graphics by Edward Angel
Curriculum — 4 Units
U1
Unit 1 · 6 Topics · 0% complete
2D Graphics Primitives
Key Formulae
DDA:x(k+1) = x(k) + Δx; y(k+1) = y(k) + Δy
Bresenham:Decision parameter: p(k) = 2Δy - Δx
Raster Graphics
DDA Line Algorithm
Bresenham's Line Algorithm
Midpoint Circle Algorithm
Polygon Filling
Scan-Line Fill
U2
Unit 2 · 8 Topics · 0% complete
2D & 3D Transformations
Key Formulae
Translation:x' = x + tx; y' = y + ty
Rotation:x' = x·cosθ - y·sinθ; y' = x·sinθ + y·cosθ
Scaling:x' = x·sx; y' = y·sy
Homogeneous:[x y 1] for 2D; [x y z 1] for 3D (enables matrix ops)
Translation
Rotation
Scaling
Reflection
Shearing
Homogeneous Coordinates
Composite Transformations
3D Transformations
U3
Unit 3 · 6 Topics · 0% complete
Clipping & Projections
Key Formulae
Cohen-Sutherland:Region codes: 9 regions (TBRL bits)
Perspective:x' = x·d/z; y' = y·d/z (divide by depth)
Cohen-Sutherland Clipping
Liang-Barsky Clipping
Polygon Clipping (Sutherland-Hodgeman)
Parallel Projection
Perspective Projection
Viewport Transformation
U4
Unit 4 · 6 Topics · 0% complete
3D Rendering & Hidden Surface
Key Formulae
Z-Buffer:For each pixel, store depth; render closest
Phong Reflection:I = Ia·ka + Id·kd·(N·L) + Is·ks·(R·V)^n
Back-Face Culling
Z-Buffer Algorithm
Scan-Line Method
Depth Sorting (Painter's)
Shading (Flat, Gouraud, Phong)
Illumination Models
Previous Year Questions
Unit 12023 · End Semester8 marks
Use Bresenham's line algorithm to draw a line from (2,3) to (9,8). Show all intermediate points and decision parameters.
Unit 22023 · End Semester10 marks
Given a triangle with vertices A(1,1), B(4,1), C(2,3). Rotate it by 45° about origin, then translate by (3,2). Show transformation matrices and final coordinates.
Unit 32022 · End Semester6 marks
Apply Cohen-Sutherland line clipping for line (30,60) to (70,20) with window (40,40) to (80,80). Show region codes and clipping steps.
Exam Strategy
📐
Algorithms need step-by-step
DDA, Bresenham, Midpoint Circle — show ALL steps with calculations. Missing intermediate points = lost marks. Practice at least 5 examples each.
🔢
Matrix transformations
Rotation, scaling, translation matrices must be written correctly. Composite transformations: multiply matrices in REVERSE order (rightmost first).
🎨
Clipping is algorithmic
Cohen-Sutherland, Liang-Barsky need region codes and step-by-step line subdivision. Draw diagrams, show calculations, label regions.
Related Subjects
Semester 7
Computer Vision
CS 703
Semester 1
Engineering Mathematics I
MATH 101