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:
- Overview of computer graphics concepts
- CRT, spots and lights, raster and random scan displays, color models
- Color CRT monitors, flat CRT, and Video controller systems
- Raster and vector graphics.
- OpenGL program and structures, Windows, points, coordinate system
- Primitive objects and fill colors in OpenGL
- Line drawing techniques:
- DDA algorithm
- Bresenham’s algorithm
- Circle drawing techniques:
- Midpoint circle algorithm
- Bresenham’s algorithm
- 2D/3D transformations:
- Translation, scaling, shearing, rotation
- Affine transformations
- 2D/3D deformation techniques:
- Shearing, tapering, twisting, bending
- Model view transformations
- 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:
- Input Devices (e.g., mouse, keyboard)
- Central Processing Unit (CPU)
- Graphics Processing Unit (GPU)
- Memory
- Frame Buffer
- Output Devices (e.g., monitors)
- 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:
- CRT
- LCD
- OLED
- 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.