FM

Computer Graphics Lecture Notes

Course Description:

  • Introduction to techniques for constructing 2D and 3D graphics using OpenGL.
  • Topics include:
    • Rendering pipeline
    • Primitive drawings
    • Geometric transformations
    • Clipping
    • Lighting and illumination
    • Color models
    • Texture mapping
    • Ray-tracing animation

Course Content Overview:

  1. Overview of computer graphics concepts
  2. CRT, spots and lights, raster and random scan displays, color models
  3. Color CRT monitors, flat CRT, and Video controller systems
    • Raster and vector graphics.
  4. OpenGL program and structures, Windows, points, coordinate system
  5. Primitive objects and fill colors in OpenGL
  6. Line drawing techniques:
    • DDA algorithm
    • Bresenham’s algorithm
  7. Circle drawing techniques:
    • Midpoint circle algorithm
    • Bresenham’s algorithm
  8. 2D/3D transformations:
    • Translation, scaling, shearing, rotation
    • Affine transformations
  9. 2D/3D deformation techniques:
    • Shearing, tapering, twisting, bending
  10. Model view transformations
  11. Light and shadow rendering techniques

Prerequisites:

  • Install C++, OpenGL, GLUT (Free Glut).
  • Basic linear algebra and analytic geometry.

Assessment Breakdown:

  • Quiz: 10% (Week 4 and Week 10)
  • Course Project: 25% (Week 14)
  • Participation: 5%
  • Midterm Exam: 20% (Week 7)
  • Final Exam: 40%

Understanding Images:

  • An image is a combination of objects, lights, and a viewer.
  • Methods for acquiring digital images include:
    • Scanner
    • Digital cameras
    • Computer graphics

Image Synthesis:

  • Refers to the construction of images from scratch.
  • Rendering refers to the synthesis of 2D images from a 3D scene description.

What is Computer Graphics?

  • Definition: Creation, storage, and manipulation of models and images by a computer.
  • Involves generating 2D images of a 3D world represented in a computer.
  • Tasks include:
    • Modeling: Creating and representing geometry.
    • Rendering: Generating 2D images from 3D objects.
    • Animation: Describing how objects change over time.

Differences Between 2D and 3D Graphics:

  • 2D Graphics: Flat images, with (x, y) color values.
  • 3D Graphics: Objects have depth, represented by (x, y, z) coordinates.

Importance and Applications of Computer Graphics:

  • Rapid and economical production of pictures using computers.
  • Wide range of applications:
    • Graphics presentation
    • User interfaces
    • Image processing
    • Virtual reality
    • Games and entertainment

Applications in Detail:

  • Data Visualization: Used in scientific, business, and medical fields to analyze complex processes.
  • Graphs and Charts: Visual representation of statistics and data.
  • Computer-Aided Design (CAD): Used in engineering and architectural design processes.
  • Virtual Reality: Creating interactive 3D environments.
  • Training Applications: Simulations for pilot and ship captain training.

Computer Graphics vs. Computer Vision:

  • Computer Vision (CV): Focuses on extracting useful information from images and analyzing it.
  • Computer Graphics (CG): Deals with synthesizing images from models using algorithms.

Key Components of a Graphics System:

  1. Input Devices (e.g., mouse, keyboard)
  2. Central Processing Unit (CPU)
  3. Graphics Processing Unit (GPU)
  4. Memory
  5. Frame Buffer
  6. Output Devices (e.g., monitors)

Input Devices:

  • Physical:
    • Keyboard, pointing devices (mouse, light pen, etc.).
    • Touchscreens, graphic tablets, image scanners.
  • Logical:
    • String device, locator, widget, valuator.

Graphics Processing Unit (GPU):

  • Specialized circuit for manipulating and accelerating image creation in a frame buffer.

Frame Buffer:

  • Storage area for images, represented as a 2D array (matrix of 0s and 1s).

Raster Scan Displays:

  • Display images as discrete points (pixels) refreshed line by line.

Random Scan Displays:

  • Draw images using geometrical primitives based on mathematical equations.

Color CRT Monitors:

  • Utilizes phosphors to display colors; methods include beam penetration and shadow mask.

Display Technologies:

  1. CRT
  2. LCD
  3. OLED
  4. Various display devices like monitors and projectors.

Drawing in OpenGL:

  • Utilize functions like glBegin, glEnd, glVertex2i etc. to create shapes.
  • Draw points, lines, triangles, quads, and polygons using OpenGL commands.