Foundations of Computer Graphics –
Deep Detailed Notes
Unit 1: Introduction to Computer Graphics
🔹 **Graphics System Overview**:
A graphics system includes hardware and software used to create, manipulate, and display
graphical data. It consists of:
- **Input Devices**: Mouse, keyboard, joystick, touch screen.
- **Processing Unit**: Graphics Processing Unit (GPU) handles rendering.
- **Output Devices**: Monitors, printers, plotters.
🔹 **Basic Elements**:
- **Pixel**: Smallest screen unit; represents color.
- **Frame Buffer**: Memory holding pixel data.
- **Aspect Ratio**: Width-to-height ratio of display.
- **Resolution**: Number of pixels on screen (e.g., 1920×1080).
- **Scan Conversion**: Converts primitives (lines, circles) into pixel values.
🔹 **Applications**:
- CAD (design & drafting)
- Virtual reality & simulation
- Gaming and entertainment
- Scientific visualization
- Medical imaging
- GUI design
🔹 **Display Technologies**:
- **Raster Scan**: Refreshes screen line by line. Stores image in frame buffer.
- **Random Scan**: Draws lines directly using electron beams (used in early CRTs).
🔹 **I/O Devices**:
- Input: Light pen, digitizer, scanner, touchscreen.
- Output: LCD monitor, OLED, dot-matrix printer, 3D printer.
Unit 2: Drawing and Clipping Primitives
🔹 **Line Drawing Algorithms**:
- **DDA (Digital Differential Analyzer)**:
Uses floating point increments. Slower, less efficient.
- **Bresenham’s Algorithm**:
Uses integer arithmetic. Fast and accurate. Best for raster displays.
🔹 **Circle Drawing**:
- **Midpoint Circle Algorithm**: Uses symmetry to reduce calculations. Decides pixel
positions based on midpoint between candidate pixels.
🔹 **Ellipse Drawing**:
- **Midpoint Ellipse Algorithm**: Divides ellipse into 2 regions and calculates pixels using
symmetry.
🔹 **Polygon Filling**:
- **Scanline Fill**: Horizontal line intersects edges and fills between them.
- **Flood Fill**: Fills boundary by checking color match.
- **Boundary Fill**: Uses edge color to determine bounds.
🔹 **Clipping Algorithms**:
- **Line Clipping**:
- **Cohen-Sutherland**: Divides region into 9 zones. Uses region codes.
- **Liang-Barsky**: Uses parametric equations for clipping.
- **Polygon Clipping**:
- **Sutherland-Hodgman**: Clips one edge at a time.
Unit 3: Transformation and Viewing
🔹 **2D Transformations**:
- **Translation**: Move object → Matrix: [1 0 tx; 0 1 ty; 0 0 1]
- **Scaling**: Resize object → Matrix: [sx 0 0; 0 sy 0; 0 0 1]
- **Rotation**: Rotate about origin → [cosθ -sinθ 0; sinθ cosθ 0; 0 0 1]
- **Reflection**: Flip across axis
- **Shearing**: Slant shape → x-shear or y-shear
🔹 **Homogeneous Coordinates**:
- Adds 1 extra coordinate (x, y) → (x, y, 1)
- Allows translation using matrix multiplication
🔹 **Composite Transformations**:
- Multiply matrices to combine multiple transformations
- Order matters: Last transformation is applied first
🔹 **3D Transformations**:
- 4x4 matrices used for translation, scaling, rotation in 3D
- Rotations: About X, Y, or Z axis (complex matrix forms)
🔹 **Viewing Transformation**:
- Converts world coordinates to viewing coordinates
- **Parallel Projection**: Orthographic view (lines remain parallel)
- **Perspective Projection**: Objects farther away appear smaller
🔹 **Vanishing Points**:
- Point at which parallel lines appear to meet in perspective view
- 1-point, 2-point, and 3-point perspective
Unit 4: Geometric Modelling
🔹 **Polygon Mesh Representation**:
- Describes 3D objects using vertices, edges, faces
- Types: Wireframe, Surface, Solid mesh
- Face list, edge list, vertex list form the data structure
🔹 **Cubic Polynomial Curves**:
- **Hermite Curves**:
- Defined by: Start & end points + tangents
- Uses blending functions (h1–h4) or Hermite matrix
- **Bezier Curves**:
- Defined by 4 control points
- Uses Bernstein polynomials
- Curve lies within convex hull of control points
🔹 **Uses**:
- Path animation
- Font and logo design
- Modeling smooth surfaces
Unit 5: Visible Surface Determination & Rendering
🔹 **Z-Buffer Algorithm**:
- Stores depth (z) value per pixel
- Closer object replaces farther one
- Easy to implement; needs memory
🔹 **List-Priority (Painter’s) Algorithm**:
- Sort objects by depth
- Draw from farthest to nearest
- May fail with intersecting polygons
🔹 **Area Subdivision**:
- Recursively divide screen into areas
- Resolve visibility per region
- Efficient for simple scenes
🔹 **Illumination Models**:
- **Phong Model**: Ambient + Diffuse + Specular lighting
- Equation:
I = IaKa + IdKd(L•N) + IsKs(R•V)^n
🔹 **Shading**:
- **Gouraud Shading**: Vertex lighting + interpolated intensity
- **Phong Shading**: Interpolated normals + pixel lighting
🔹 **Color Model**:
- RGB: Red, Green, Blue (0–255)
- Basis of screen color mixing
🔹 **Animation Basics**:
- **Keyframe Animation**: Important frames defined; system interpolates
- **Storyboarding**: Sketch sequence before animation
- **Morphing**: Smooth shape transition (e.g. face to face)
- **Simulating Motion**: Physics-based (e.g., bounce, swing)