351 GM 19 Computer Graphics
Unit I Overview of Computer Graphics:
Definition and applications of computer graphics, Elements of graphics workstation, Video
Display Devices - Bit-Mapped Graphics and Vector Graphics, working of CRT, Raster
scanning and random scanning, Beam penetration CRT, Shadow mask CRT, Flat-panel
displays (Introduction Only), Graphics Software, Co-ordinate representations, Graphics
Functions.
Unit II Line and circle Drawing:
DDA line drawing algorithm, Bresenham’s Line algorithm, Circle and elipse generating
algorithms- Midpoint Circle Algorithm, Midpoint Elipse Algorithm, Polynomials and spline
curves, Filling-Filed - Area Primitives, Scan-Line Polygon File Algorithm, Inside-Outside
Tests, Scan-Line File of Curved Boundary Areas, Boundary-File Algorithm, Flood-File
Algorithm
Unit III Transformations:
Attributes of Output Primitives, Line Attributes - Line Type, Line Width, Pen and Brush
Options, Line Color, Color and Grayscale levels- Color Tables, Grayscale, Area - Fil Attributes
- Fil Styles, Pattern Fil, Soft Fil, Character Attributes, Text Attributes Geometric
Transformations: Matrices, 2D transformations, Homogeneous representations - other
transformation - Two-Dimensional Viewing, The viewing pipeline, Viewing Coordinate
Reference Frame, Window-to-viewport Coordinate Transformation, Two-Dimensional
Viewing Functions, Clipping Operations - Point Clipping, Line Clipping, Cohen-Sutherland
Line Clipping, Polygon Clipping, Sutherland-Hodgeman Polygon Clipping.
Unit IV Two & three Dimensional Viewing and Clipping:
Interior and Exterior Clipping, Point Clipping, Line Clipping - Cohen-Sutherland Line
Clipping, Mid-Point subdivision algorithm, Sutherland-Hogeman Polygon Clipping
Algorithm, Text Clipping. Three Dimensional Concepts: Three Dimensional Display Methods
- Paralllel Projection, Perspective Projection, Visible Line and surface Identification, Surface
Rendering, Three Dimensional Object Representations - 3D transformations - Bezier Curves
and surfaces.
Unit V Visible-Surface Detection Methods and Projection (Introduction
Only):
Visibility, Image and object precision, Z-Buffer Algorithm, A-Buffer Algorithm, Scan-Line
Algorithm. Projection (Introduction Only): Perspective projection - one point, two point and
three point, Parallel projection - Orthographic, Axonometric and Oblique. Perspective
anomalies - Computer Animations, Design of Animation Sequences, General Computer -
Animation Functions - Raster Animations, Key-Frame Systems, Morphing, Motion
Specifications.
1
Unit I Overview of Computer Graphics
Definition and applications of computer graphics, Elements of graphics workstation, Video
Display Devices - Bit-Mapped Graphics and Vector Graphics, working of CRT, Raster
scanning and random scanning, Beam penetration CRT, Shadow mask CRT, Flat-panel
displays (Introduction Only), Graphics Software, Co-ordinate representations, Graphics
Functions.
= = = = = = = = = = = = = = = = = = = = = = = == = = = = = = = = = = = = = = = = == = = =
Definition of Computer Graphics
• The term ‘Computer Graphics’ was coined by Verne Hudson and William Fetter from
Boeing who were pioneers in the field.
• It is an art of drawing pictures, lines, chart etc on computer screen by using
programming languages.
• The creation, manipulation and the representation of the visual image or the data in a
graphical manner using computer.
• Various technology is required for the creation and manipulation.
• In computer graphics objects are presented as a collection of discrete picture elements
(pixels).
Applications of computer graphics
Entertainment: Motion pictures, Music videos, and TV shows, Computer games.
2
Computer Art
• Painting packages are available. With cordless, pressure-sensitive stylus, artists can
produce electronic paintings which simulate different brush strokes, brush widths, and
colors.
• Photorealistic techniques, morphing and animations are very useful in commercial
art.
• For films, 24 frames per second are required. For video monitor, 30 frames per second
are required.
3
Morphing
Simulation: Training simulations for pilots, medical procedures, etc.
4
Education and Training: Training with computer-generated models of specialized systems
such as the training of ship captains and aircraft pilots.
Visualization
For analysing scientific, engineering, medical and business data or behaviour. Converting data
to visual form can help to understand mass volume of data very efficiently.
Image Processing
Image processing is to apply techniques to modify or interpret existing pictures. It is
widely used in medical applications.
Graphical User Interface
Multiple window, icons, menus allow a computer setup to be utilized more efficiently.
Computer-Aided Design (CAD)
5
• Design of buildings, automobiles, aircraft, watercraft, spacecraft, computers, textiles,
etc.
• Objects maybe displayed in a wireframe outline form. Multi-window environment is
also favoured for producing various zooming scales and views.
• Animations are useful for testing performance.
Fig 1. Color-coded wireframe display for an automobile wheel assembly.
Presentation Graphics
To produce illustrations which summarize various kinds of data. Except 2D, 3D graphics
are good tools for reporting more complex data.
= = = = = = = = = = = = = = = == = = = = = = = = = == = = = == = = = = = == = = = == =
Elements of Graphics Workstation
A graphics workstation is a specialized computer system designed for tasks related to computer
graphics, such as 3D modeling, rendering, animation, and image processing. The key elements
of graphics workstation are:
6
Graphics Processing Unit (GPU): The GPU is a critical component responsible for rendering
graphics and performing complex mathematical calculations required for tasks like 3D
rendering and simulations.
Central Processing Unit (CPU): CPU plays a role in overall system performance. It is used
to handle general computing tasks and support the parallel processing capabilities of GPUs.
Memory (RAM): Adequate RAM is crucial for handling large datasets, complex 3D models,
and high-resolution textures. storage is essential for storing large graphics files, project data,
and applications. Solid-state drives (SSDs) are commonly used to provide quick access to data,
reducing loading times for graphics applications.
Display System: Graphics workstations are equipped with high-quality displays capable of
rendering accurate and detailed images. Multiple monitors may be used to enhance
productivity, allowing for efficient multitasking and the simultaneous display of multiple
project components.
Input Devices: Specialized input devices are often used in graphics workstations, such as
graphics tablets or stylus-based input devices. These tools provide precision and control for
tasks like digital drawing, painting, and 3D modeling.
Professional Graphics Software: Graphics workstations are equipped with industry-standard
graphics software tailored for tasks like 3D modeling, animation, rendering, and image
processing. Examples include Autodesk Maya, Adobe Creative Suite, and Cinema 4D.
Specialized Hardware Accelerators: In some cases, graphics workstations may include
additional hardware accelerators for specific tasks. For example, dedicated hardware for real-
time ray tracing or AI-based features can enhance performance in certain graphics applications.
Peripheral Connectivity: Graphics workstations typically provide a variety of ports for
connecting external devices, such as external storage, peripherals, and additional displays.
= = = = = = = = = = = = = = = == = = = = = = = = = == = = = == = = = = = == = = = == =
Video Display Devices:
There are two main types of video display devices
1. Bit-Mapped Graphics
2. Vector Graphics.
Bit-Mapped Graphics: Uses a grid of pixels, each representing a color or shade.
Vector Graphics: Uses mathematical equations to define shapes and lines.
Working of CRT (Cathode Ray Tube):
• The primary output device in a graphics system is a video monitor. The operation of
most video monitors was based on the standard cathode-ray tube (CRT) design.
• In recent years, flat-panel displays have become more popular due to their reduced
power consumption and thinner designs.
7
• The basic operation of a CRT is explained below:
• A beam of electrons i.e negatively charged electrons (cathode rays) emitted by an
electron gun, passes through focusing and deflection systems that direct the beam
toward specified positions on the phosphor coated screen. Fig.1.
Fig 1 Basic design of a magnetic-deflection CRT.
• The phosphor then emits a small spot of light at each position contacted by the electron
beam.
• Because the light emitted by the phosphor fades very rapidly, some method is needed for
maintaining the screen picture.
• One way to keep the phosphor glowing is to redraw the picture repeatedly by quickly
directing the electron beam back over the same points. This type of display is called a
refresh CRT.
• The primary components of an electron gun in a CRT are the heated metal cathode and a
control grid (Fig. 2).
8
Fig 2 Operation of an electron gun with an accelerating anode
• Heat is supplied to the cathode by directing a current through a coil of wire, called the
filament, inside the cylindrical cathode structure.
• This causes electrons to be “boiled off” the hot cathode surface.
• In the vacuum inside the CRT envelope, the free, negatively charged electrons are then
accelerated toward the phosphor coating by a high positive voltage.
• The accelerating voltage can be generated with a positively charged metal coating on the
inside of the CRT envelope near the phosphor screen, or an accelerating anode can be used,
as in Fig.3.
Fig 3 Electrostatic deflection of the electron beam in a CRT.
• Control Grid controls the flow of negatively charged electrons.
9
• Focusing system is used to create clear picture by focusing the flow of electrons into a
narrow beam. Focusing is accomplished with either electric or magnetic fields.
• The amount of light emitted by the phosphor coating depends on the number of electrons
striking the screen, The focusing system in a CRT is needed to force the electron beam to
converge into a small spot as it strikes the phosphor. Otherwise, the electrons would repel
each other, and the beam would spread out as it approaches the screen.
• The distance that the electron beam must travel to different points on the screen varies
because the radius of curvature for most CRTs is greater than the distance from the focusing
system to the screen center. Therefore, the electron beam will be focused properly only at
the center to the screen.
• As the beam moves to the outer edges of the screen, displayed images become blurred.
• To compensate for this, the system can adjust the focusing according to the screen position
of the beam. As with focusing, deflection of the electron beam can be controlled either
with electric fields or with magnetic fields.
• Deflection system controls the direction of electron beam by using electric or magnetic
field. Suppose it is working on electric field, the two plates are parallel plate and used for
horizontal plate and vertical plate.
• Suppose it is working on magnetic field, two pair of coils are used.
• Horizontal deflection is accomplished with one pair of coils, and vertical deflection by the
other pair. The proper deflection amounts are attained by adjusting the current through the
coils.
• Electrostatic deflection has two pairs of parallel plates are mounted inside the CRT
envelope. One pair coil plates is mounted horizontally to control the vertical deflection,
and the other pair is mounted vertically to control horizontal deflection (Fig. 3).
• Phosphor coated screen, inside surface of CRT is coated with phosphorus.
• Phosphorous glows when highly energy electron beam hits the screen. (Left to Right,
Up-and Down). i.e When the electrons in the beam collide with the phosphor coating.
• Spots of light are produced on the screen by the transfer of the CRT beam energy to the
phosphor.
• The frequency (or color) of the light emitted by the phosphor is proportional to the
energy difference between the excited quantum state and the ground state. Different kinds
of phosphors are available for use in a CRT.
• Persistence: How long emitted light continues after the CRT beam is removed.
10
✓ Lower persistence phosphors require higher refresh rates to maintain a picture on the
screen without flicker. It is useful for animation.
✓ High-persistence phosphor is useful for displaying highly complex, static pictures.
Typically, persistence ranges from 10 to 60 microseconds in graphics monitors.
• Resolution: The maximum number of points that can be displayed without overlap on
a CRT is referred to as the resolution.
• Resolution is the number of points per centimeter that can be plotted horizontally and
vertically.
• High-resolution displays are capable of showing more detail, making them ideal for
tasks that require precision, such as graphic design, video editing, or medical imaging.
• Aspect Ratio: The aspect ratio is related to resolution and indicates the relationship
between the number of points vertically and horizontally. For instance, an aspect ratio
of 3/4 means that for every 3 points vertically, and 9 points horizontally
= = = = = = = = = = = = = = = = = = = = = = = == = = = = = = = = = = = = = = = = == = = = = = = = === = = = =
Raster Scan Display
• The most common type of graphics monitor employing a CRT is the raster-scan display,
based on television technology.
• In a raster-scan system, “the electron beam is swept across the screen, one row at a time
from top to bottom”.
• As the electron beam moves across each row, the beam intensity is turned on and off to
create a pattern of illuminated spots.
• Picture definition is stored in a memory area called the refresh buffer or frame buffer.
• This memory area holds the set of intensity values for all the screen points.
• Stored intensity values are then retrieved from the refresh buffer and "painted" on the screen
one row (scan line) at a time as in the following figure.
11
• Each screen point is referred to as a pixel or pel (shortened forms of picture element).
Raster Scanning: Scans the screen in a systematic, left-to-right, top-to-bottom manner.
Random Scanning: Scans the screen based on the graphics command, allowing non-sequential
access.
Beam Penetration CRT:
In this type of CRT, the electron beam penetrates the phosphor layer, resulting in better color
reproduction.
Shadow Mask CRT:
This type of CRT uses a perforated metal sheet (shadow mask) to control electron beam
placement, improving color accuracy.
Flat-Panel Displays (Introduction Only):
Flat-panel displays, such as LCD and OLED, are thin, lightweight alternatives to CRTs,
offering improved energy efficiency and space savings.
Graphics Software:
Software plays a crucial role in computer graphics. It includes:
Operating System: Manages hardware and resources.
Graphics Drivers: Software enabling communication between the GPU and operating system.
Graphics Libraries: Provide pre-built functions for graphics programming.
Coordinate Representations:
Graphics systems use various coordinate systems, such as Cartesian (x, y) or polar coordinates,
to locate and manipulate objects on the screen.
Graphics Functions:
12
These are operations performed on graphical objects, such as drawing lines, circles, and
polygons, filling areas, and transforming shapes.
In summary, computer graphics is a multidisciplinary field that involves hardware, software,
and mathematical concepts to create, manipulate, and display visual content for diverse
applications.
13