Computer Graphics: Essential Concepts and Techniques

Display Devices

Display devices are used to display graphical output generated by a computer.

1) CRT (Cathode Ray Tube)

  • Uses an electron beam to strike a phosphor screen.
  • The beam scans line by line to produce an image.
  • Used in old monitors and TVs.
  • Advantages: Good color quality.
  • Disadvantages: Heavy, bulky, high power consumption.

2) LCD (Liquid Crystal Display)

  • Uses liquid crystals to control light.
  • Requires a backlight.
  • Thin, lightweight, and consumes less power.
  • Used in laptops and mobile phones.

3) LED (Light Emitting Diode)

  • An advanced form of LCD.
  • Uses LEDs for backlighting.
  • Better brightness and contrast.
  • More energy-efficient than LCD.

Computer Graphics Overview

Computer Graphics is a branch of computer science that deals with the creation, storage, manipulation, and display of images using a computer.

Examples:

  • Video games
  • Animated movies
  • CAD software
  • Medical imaging

Types of Display Devices

  1. Raster Scan Display
  2. Random Scan Display

LCD vs. LED Displays

LCD Display

  • Uses liquid crystals.
  • Needs a fluorescent backlight.
  • Less brightness compared to LED.
  • Thin and energy-efficient.

LED Display

  • Uses light-emitting diodes.
  • Brighter with better contrast.
  • Long life and less power consumption.
  • Used in modern monitors and TVs.

Polygon Representation Approaches

Polygons are represented in the following ways:

1) Vertex Table

Stores the coordinates of all vertices.

2) Edge Table

Stores information about edges between vertices.

3) Surface Table

Stores information like color, shading, and surface normal. These methods help in rendering and hidden surface removal.


Transformation Matrix Multiplication

Pre-Multiplication

T × M: The transformation matrix is multiplied before the object matrix.

Post-Multiplication

M × T: The transformation matrix is multiplied after the object matrix. Changing the order changes the final result.


Polygon Types

A polygon is a closed figure formed by joining three or more straight line segments.

Types:

  • Convex Polygon
  • Concave Polygon
  • Regular Polygon
  • Irregular Polygon

2D Transformations

1) Translation

Moves an object from one position to another.
x’ = x + tx, y’ = y + ty

2) Scaling

Changes the size of an object.
x’ = x × sx, y’ = y × sy

3) Rotation

Rotates an object by angle θ.
x’ = x cosθ − y sinθ, y’ = x sinθ + y cosθ


Normalization Transformation

Normalization transformation converts coordinates into a standard coordinate system.

Why it is needed:

  • Device-independent display.
  • Makes objects fit inside a viewport.
  • Used in clipping.
  • Helps in mapping world coordinates to screen coordinates.

3D Translation

3D translation moves an object in x, y, and z directions.
x’ = x + tx, y’ = y + ty, z’ = z + tz
Example: (2,3,4) translated by (1,2,3) → (3,5,7)


2D Clipping

Clipping is the process of removing the unwanted part of an object outside the clipping window.

Types:

  • Line Clipping
  • Polygon Clipping
  • Text Clipping

Algorithms:

  • Cohen-Sutherland
  • Liang-Barsky

Viewing Transformation

Viewing transformation converts world coordinates into viewing coordinates. Steps: 1. World to View coordinate, 2. Projection, 3. Viewport mapping.


Shading Algorithms

1) Flat Shading

  • Single color per polygon. Fast and simple, but not smooth.

2) Gouraud Shading

  • Intensity calculated at vertices and interpolated across the surface. Smooth but may miss highlights.

3) Phong Shading

  • Normal vectors interpolated; intensity calculated at each pixel. Produces very smooth, realistic images but is computationally expensive.

Hidden Surface Removal

1) Z-Buffer Algorithm

  • Stores depth value for each pixel. Smaller z (closer) is visible. Simple but requires extra memory.

2) Painter’s Algorithm

  • Sorts polygons by depth and draws from back to front. Near objects overwrite far ones.

Z-Buffer Implementation

  1. Initialize Z-buffer with maximum depth.
  2. For each pixel, set color to background.
  3. For each polygon: Compute depth, compare with Z-buffer. If new z < stored z, update pixel color and Z value.

Curves and Interpolation

A curve is a smooth continuous path defined mathematically. Interpolation means the curve passes exactly through given control points.

Uses:

  • Font design, Animation, Car body design, CAD.

Hilbert Curve Generation

A space-filling fractal curve generated recursively by dividing squares and rotating U-shapes.


Interpolation vs. Approximation

InterpolationApproximation
Passes through all pointsDoes not pass through all
More accurateSmoother

Fractals

Fractals are irregular shapes that show self-similarity.

Types:

  1. Deterministic (Koch curve)
  2. Random (Mountains)
  3. Escape Time (Mandelbrot set)

Bezier Curves

A parametric curve defined by control points. Properties: Passes through first and last points, lies inside the convex hull, and is controlled by Bernstein polynomials.


Segment Management

A segment is a group of graphical objects. Creation involves assigning an ID and adding primitives to a table; deletion involves removing the ID from the table.


Animation Sequence Design

Steps: Storyboarding, Object modeling, Key frame design, In-between generation, Timing control, and Rendering.


NVIDIA vs. i8060

NVIDIA: GPU-based, parallel processing, high FPS, supports CUDA. i8060: CPU-based, serial processing, general tasks.


Conventional vs. Computer Animation

1) Conventional Animation

  • Hand-drawn, time-consuming, expensive, difficult to edit.

2) Computer Animation

  • Software-based, faster production, cost-effective, easy to edit.

Segment Table

A segment is a logical group of graphical primitives. The Segment Table stores the Segment ID, visibility flag, priority, transformation parameters, and a pointer to the display file.


Motion Specification Techniques

  1. Key Frame Method: Animator defines start/end frames; computer generates intermediates.
  2. Path Specification: Object moves along a predefined path.
  3. Procedural Method: Motion defined by mathematical equations.
  4. Kinematics Method: Motion defined by joint angles (Forward/Inverse).
  5. Dynamics Method: Motion based on physical forces like gravity and friction.