CST304 -M1-Ktunotes.in
Basics Of Computer Graphics
Definition: Computer graphics refers to the art of drawing pictures on a computer screen using programming. It encompasses computations and changes of data to produce images such as graphs or designs.
Output: The result can be 2-D or 3-D images utilized in various fields, including business presentations and engineering.
Elementary Unit: The basic unit of an image is a pixel.
Importance of Computer Graphics
Importance of Computer Graphics
Data Presentation: Graphics make it easier to understand large sets of data by providing visual representations like charts and graphs. For example, sales data over the years can be represented graphically for better comprehension.
Advantages: Visual information can be processed more rapidly compared to textual or numerical information.
/
Applications of Computer Graphics
Computer Art
Creation of animations and commercial artwork using graphics software.
Computer Aided Design (CAD)
Used in designing structures like buildings and vehicles, providing great precision and detail.
Presentation Graphics
Tools help create reports and summaries in visually appealing formats like bar graphs and pie charts.
Entertainment
Significant usage in the film industry for producing motion graphics, films, and visual effects.
Education
Computer graphics facilitate teaching complex concepts by representing them visually, making learning easier. Specialized simulation tools can be developed for training purposes.
Types of Computer Graphics
Interactive Graphics (Active)
Involves user interaction with the computer, allowing real-time control over images via input devices (e.g., video game controllers).
Non-Interactive Graphics (Passive)
Users have no control over images; the content is displayed as pre-defined and operates according to set instructions (e.g., television displays).
Video Display Devices
Introduction
i. Main Output Device: The video monitor serves as the primary output medium in graphic systems. ii. Technologies: Various types exist, including CRT (Cathode-ray tube) and flat panel displays. CRT is traditional but may be replaced by solid-state technologies.
Types of Display Devices
CRT Monitors: Based on cathode ray technology.
Raster Scan Displays: Move an electron beam across the screen, illuminating pixels to create images. Commonly used in CRT.
Flat Panel Displays: More modern displays, lower energy consumption and space requirement.
3D Viewing Devices: Used for stereoscopic and virtual reality applications.
Cathode Ray Tube (CRT) Technology
Basics of CRT
Components:
Electron Gun: Produces the electron beam.
Deflection System: Directs the beam towards the screen.
Phosphor Coating: Emits light when struck by electrons, creating visible images.
Operation of CRT
Beam Generation: Electrons emitted by the gun sweep across the phosphor screen.
Refresh Rate: The beam is redrawn quickly to maintain persistence of vision, ensuring the image remains visible.
Resolution: Defined as the number of points that can be displayed, impacting clarity and detail.
Raster Scan Displays
Functionality
Utilizes a scanning technique where the electron beam progresses from top to bottom, one row at a time, altering intensity to create images.
Frame Buffer: Stores pixel intensity information for displaying images.
Raster Scan Architecture
Components
CPU: Processes the information.
Memory buffer: Stores pixel data.
Video Controller: Manages output to monitor.
System Bus: Connects components.
Advantages of Raster Scan Displays
Ability to display realistic images with greater color depth and shade variations compared to other systems.
Algorithms in Computer Graphics
Digital Differential Analyzer (DDA) Algorithm
Purpose: Used for line generation in graphics.
Steps:
Calculate the slope (m = (y2 - y1)/(x2 - x1)).
Determine intermediate points based on the slope.
Bresenham’s Line Algorithm
Functionality: An efficient algorithm for drawing straight lines and circles.
Decision Parameter: Used to determine which pixel to illuminate next for creating the desired shape.
Midpoint Circle Algorithm
This algorithm draws circles based on decision parameters that determine the radius and center.
It systematically evaluates pixels to achieve circular shapes.
Example Applications of Algorithms
Line Drawing: Using DDA and Bresenham's algorithm for line generation between specified points.
Circle Drawing: Implementation of midpoint circle algorithm for circles, maintaining uniform distribution of pixels.