Computer Graphics

The creation, manipulation, and rendering of visual content using computers — spanning 2D/3D modeling, animation, rendering, and interactive visualization.

Introduction to Computer Graphics

Introduction to Computer Graphics is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Time complexity (Big-O), space complexity, correctness proof, and practical implementation trade-offs.

Fundamentals of Computer Graphics

Fundamentals of Computer Graphics is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Time complexity (Big-O), space complexity, correctness proof, and practical implementation trade-offs.

Core Concepts in Computer Graphics

Core Concepts in Computer Graphics is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Time complexity (Big-O), space complexity, correctness proof, and practical implementation trade-offs.

Foundations of Computer Graphics

Foundations of Computer Graphics is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Time complexity (Big-O), space complexity, correctness proof, and practical implementation trade-offs.

Essential Principles

Essential Principles is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Core principles, practical applications, and advanced concepts that build deep understanding.

Key Theories and Models

Key Theories and Models is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Core principles, practical applications, and advanced concepts that build deep understanding.

Practical Applications

Practical Applications is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Core principles, practical applications, and advanced concepts that build deep understanding.

Problem-Solving Methods

Problem-Solving Methods is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Core principles, practical applications, and advanced concepts that build deep understanding.

Advanced Topics

Advanced Topics is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Core principles, practical applications, and advanced concepts that build deep understanding.

Case Studies and Examples

Case Studies and Examples is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Core principles, practical applications, and advanced concepts that build deep understanding.

Research Methods

Research Methods is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Time complexity (Big-O), space complexity, correctness proof, and practical implementation trade-offs.

Current Trends and Developments

Current Trends and Developments is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Syntax and semantics, best practices, debugging techniques, and project-based application.

Key Formulas & Equations

Transformation Matrix (2D Translation):
| 1 0 tx |
| 0 1 ty |
| 0 0 1 |
Rotation by θ:
| cos θ −sin θ 0 |
| sin θ cos θ 0 |
| 0 0 1 |
Scaling Matrix:
| sx 0 0 |
| 0 sy 0 |
| 0 0 1 |
Perspective Projection:
x' = x × f/z, y' = y × f/z
f = focal length, z = depth. Objects farther away appear smaller.
Lambert's Cosine Law: I = Imax × cos θ
θ = angle between surface normal and light direction. Maximum brightness at θ = 0°.

Core Concepts

1. Graphics Pipeline
The sequence from 3D model to 2D image: Vertex Processing → Primitive Assembly → Rasterization → Fragment Processing → Output Merging. Each stage transforms geometric data toward final pixels.
2. Rasterization
Converting geometric primitives (lines, triangles) into pixel fragments. Algorithms: Bresenham's line, scanline fill, z-buffering for hidden surface removal.
3. Transformations
Model (object to world), View (world to camera), Projection (camera to screen). Combined as M = P × V × M. Homogeneous coordinates enable translation as matrix multiplication.
4. Lighting Models
Phong: Ambient + Diffuse + Specular. Blinn-Phong: uses half-vector for specular. PBR (Physically Based Rendering): energy conservation, microfacet BRDF, metallic-roughness workflow.
5. Ray Tracing
Simulating light paths: for each pixel, cast rays into scene, compute intersections, reflections, refractions, and shadows. Produces photorealistic images at high computational cost.

Core Definitions

Vertex: A point in 3D space defined by (x, y, z) coordinates. The fundamental building block of 3D models — triangles are formed from three vertices.
Texture Mapping: Wrapping a 2D image onto a 3D surface using UV coordinates. Adds surface detail without geometric complexity. Includes diffuse maps, normal maps, specular maps.
Frame Buffer: The memory region holding pixel data before display. Typically stores RGBA values (red, green, blue, alpha) per pixel. Double buffering prevents screen tearing.
Shader: A small program running on the GPU. Vertex shaders transform vertices; fragment (pixel) shaders compute final colors. Written in GLSL, HLSL, or Metal Shading Language.
Anti-aliasing: Techniques to reduce jagged edges (aliasing) from discrete pixel sampling. MSAA (Multi-Sample), FXAA (Fast Approximate), and Temporal AA are common methods.

Worked Examples

Example 1: 2D Translation
Point (3, 4) translated by (2, −1):
x' = 3 + 2 = 5, y' = 4 + (−1) = 3
Using matrix: [5, 3, 1]T = T(2,−1) × [3, 4, 1]T
Example 2: Rotation
Point (1, 0) rotated 90° counterclockwise:
x' = cos(90°)×1 − sin(90°)×0 = 0
y' = sin(90°)×1 + cos(90°)×0 = 1
Result: (0, 1)
Example 3: Perspective Projection
Object at (10, 5, 20) with f = 500:
x' = 10 × 500/20 = 250 pixels
y' = 5 × 500/20 = 125 pixels

Practice Problems

Problem 1: Apply scaling (2, 3) to point (4, 5).
Answer: x' = 2×4 = 8, y' = 3×5 = 15 → (8, 15)
Problem 2: A surface normal makes a 60° angle with the light direction. What is the diffuse intensity relative to maximum?
Answer: cos(60°) = 0.5 → 50% of maximum
Problem 3: A point (2, 3, 10) is projected with f = 100. Find screen coordinates.
Answer: x' = 2×100/10 = 20, y' = 3×100/10 = 30 → (20, 30)
Problem 4: What is the difference between orthographic and perspective projection?
Answer: Orthographic: parallel projection, no depth scaling (used in CAD/engineering). Perspective: depth-based scaling, realistic visual appearance (used in games/movies).
Problem 5: Name three types of shaders and their roles.
Answer: Vertex (transform vertex positions), Fragment/Pixel (compute pixel colors), Geometry (modify primitives), Tessellation (subdivide surfaces), Compute (general GPU computation).

📚 Related Subjects