Unit I_CG
Unit I_CG
Chapter 1
Introduction and application
Prepared by:
Asst. Prof. Sanjivan Satyal
Introduction and application [4 hours]
CONTENTS
• Video Display Devices: Raster‐Scan Displays, Random-Scan Displays, Flat Panel Displays, 3D viewing
Devices
• Graphics Software and tools: Coordinate Representations, Graphics Functions, Software
Standards, PHIGS Workstations, DirectX, OpenGL, WebGL, Maya, Blender, Unity
• Graphics pipeline
• Two‐dimensional viewing pipeline
• Three‐dimensional viewing pipeline
• Applications in various fields like medicine, engineering, art, uses in augmented and
virtual realism.
NOTE : OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for
rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to
achieve hardware-accelerated rendering.
Data center GPUs can offer better support for parallel operations, AI, media, media analytics, and 3D rendering
solutions. Example Gaming, Machine learning, High performance computing, Creative production
Image can be created using simple point program or can be fed into computer
by scanning the image
• GUIs have become key factors for the success of the software or operating system
• GUI provides point-and-click facilities to allow users to select menu items, icons,
and objects on the screen
• Word processing, spreadsheet, and desktop-publishing programs are typical
applications that take advantage of user interface technique
• The numerical and scientific data are converted to a visual form for analysis and to
study the behaviour called visualization
• Converting data to visual form can help to understand mass volume of data very
efficiently
• Producing graphical representation for scientific data sets are called scientific
visualization
• Business visualization is used to represent the data sets related to commerce and
industry
• The visualization can be either 2D or 3D
• The weather department also uses visualization to obtain weather information. So
that the information about the data of a field can be studied properly.
• Cartography is the study and practice of designing maps using computer graphics
• Computer graphics is used to produce both accurate and schematic
representations of geographical and other natural phenomena from measurement
data
• Examples include geographic maps, exploration maps, for drilling and mining,
oceanographic charts, weather maps etc.
• Pixel Map
• An image of more than two colors
• Single pixel-multiple bits- (2n) multiple colors
Aspect Ratio
• It is defined as the ratio of total number of pixel in X-direction to the
total number of pixel in Y direction
Aspect Ratio = No. of pixel in X-direction / No. of pixel in Y-direction
Example
800*600 means, Resolution = 480000 pixels
Aspect Ratio= 4:3
Bit depth is defined as the number of bits assigned to each pixel in an image
(bpp or bits per pixel)
For eg. 1 bit per pixel represents, 21 = 2 colours for each pixel, similarly 1
byte i.e. 8 bits represents 28 = 256 colours for each pixel
It is the memory location where the intensity values of all pixels are
internally stored
It contains an internal representation of an image
The screen is redrawn many times per second, so that almost
immediately after the intensity values are changed in the frame
buffer, the intensity of the pixels on the screen will be changed to
match, and the displayed image will change
Memory in Mb is given by
x-resolution*y-resolution*bit per pixel / 8*1024*1024
It may be represented by eight bits resulting 28 = 256 gray levels for
continuous shades of gray on CRT screen
In colour system each of the three colour red, green and blue is
represented by eight bits producing 224 = 16 million colours
A medium resolution colour display having 640 x 480 pixels will thus
require (640 x 480 x 24) / 8 = 9kb of RAM
• Light emitted by phosphor fades very rapidly, so to keep the drawn picture
glowing constantly; it is required to redraw the picture repeatedly and
quickly directing the electron beam back over the some point
• Refresh rate above which flickering stops and steady it may be called as
critical fusion frequency (CFF)
• Normally 60 to 80 hz
Prepared By: Asst. Prof. Sanjivan Satyal 42
Hardware Concepts
• The display devices used in graphics system is video monitor. The most common
video monitor is based on CRT technology
• Cathode Ray Tube (CRT)
When current flows through heating filament, the electrons are piled
upon the filament. These electrons are attracted by accelerating systems
on the phosphor coated screen
When electron strikes on the screen, the phosphor emits a small spot of
light at each position contacted by the electron beam
The glowing positions are used to represent the picture in the screen
The amount of light emitted by the phosphor coating depends on the no. of
electrons striking the screen
Persistence
• How long a phosphor continues to emit light after the electron beam is removed?
• Persistence of phosphor is defined as time it takes for emitted light to decay to
1/10 (10%) of its original intensity
• Range of persistence of different phosphors can react many seconds
• The phosphor used for graphics display device usually have persistence of 10 to
60 microsecond
• A phosphor with lower persistence is useful for animation and a higher–
persistence phosphor is useful for displaying highly complex static picture
Prepared By: Asst. Prof. Sanjivan Satyal 47
Classwork
• There is a system with 24 bits per pixel and resolution of 1024 by
1024. Calculate the size of frame buffer.
• Solution:
Resolution = 1024 × 1024
Total number of pixel = 1024*1024 = 1048576 pixels
Per pixel storage = 24 bits
Total storage required in frame buffer = 1048576*24 = 25165824 bits
= 25165824/8 byte
= 25165824/(8*1024) kb
= 25165824/(8*1024*1024)Mb
= 3 Mb
Prepared By: Asst. Prof. Sanjivan Satyal 49
Classwork
• Consider a RGB raster system is to be designed using 8 inch by 10
inch screen with a resolution of 100 pixels per inch in each direction.
If we want to store 8 bits per pixel in the frame buffer, how much
storage do we need for the frame buffer?
• Raster-Scan Display
• Random-Scan Display
In this display, raster points are used as basic drawing primitive
In raster scan system, the electron beam is swept across the screen, one
row at a time from top to bottom
As electron beam moves across each row, the beam intensity is turned on
and off to create a pattern of illuminated spots
Home television and printers are example of system using raster scan
method
At the end of each frame, the electron beam returns to the top
left corner to begin next frame called vertical retrace
DISADVANTAGES:
• Resolution is lower than random scan display
• May exhibit pixilation or aliasing effect
• More memory is required as data about the intensities of all pixel has
to be stored
Video controller
• It controls the operation of the display device
• It has the direct access to the frame buffer for refreshing the screen
• It cycles through the frame buffer, one scan line at a time typically 50 times
per second or higher
• It brings a value of each pixel contained in the frame buffer and uses it to
control the intensity of the CRT electron beam
• The contents of the frame buffer at the specific pixel position(x,y) are
retrieved and used to set the intensity of the CRT beam
• There exists a one to one relationship between the pixel in the frame buffer
and that on the CRT screen
• After cycling through all pixels along the bottom scan line, the video
controller resets the registers to the first pixel position on the top scan line
and the refresh process starts over
• Random-scan monitors draw a picture one line at a time and for this
reason are also referred to as vector displays (or stroke-writing or
calligraphic displays)
• Random scan system uses an electron beam which operates like a pencil to
create a line image on the CRT
An area of memory called refresh display files stores picture definition as a set of
line drawing commands
Random scan displays are designed to draw all the components line of a
picture 30 to 60 times each second
High-quality vector systems can handle around 100,000 short lines at this
refresh rate
Vector displays produce smooth line drawings because the CRT beam
directly follows the line path
• A vector display can not fill areas with patterns and manipulate bits
• Time required for refreshing an image depends upon its complexity
(more the lines, longer the time) the flicker may therefore appear as
the complexity of the image increases
• The fastest vector display can draw about 100000 short vectors in a
refresh cycle without flickering
The application program and graphics package both reside in the system
memory and execute on CPU
This display file is then accessed by the display processor to refresh the
screen
• Vector Graphics
• A vector image is made up of paths, each with a mathematical formula (vector), that
tells the path how it is shaped and what colour it is bordered with or filled by
• Vector images keep on appearance regardless of size, since the mathematical
formulas dictate how the image is rendered
• The most common vector file types are AI( Adobe Illustrator[logo]), CDR(Corel
DRAW) , and SVG( scalable vector graphic)
Prepared By: Asst. Prof. Sanjivan Satyal 73
Random (Vector) Scan Display Raster Scan Display
1. The electron beam is directed to only 1. Electron beam is directed from top to
that part of screen where picture is bottom and one row at a time on
required to be drawn, one line at a time whole screen
2. RANDOM scan display has high 2. RASTER scan display has low resolution
resolution as it stores picture definition as picture definition is stored as a
as a set of line commands intensity value
3. Real life images cannot be displayed 3. Real life images can be displayed with
different shades
4. Refresh rate depends on the number 4. Refresh rate is around 60-80 frames
of lines to be displayed i.e. 30 to 60 times per seconds or hertz
per second
5. Smooth line is produced because 5. Zig-Zag line is produced because
directly the line path is followed by plotted values are discrete
electron beam Eg. CRT,TV, Printer
Eg. Pen plotter
6. More expensive 6. Less expensive
7. Vector images are constructed through 7. Raster images are constructed through
lines, curves, and fills. pixels.
Prepared By: Asst. Prof. Sanjivan Satyal 74
Color CRT
• Color depends on the light emitted by phosphor
• By combining the emitted light from the different phosphors, a range
of colors can be generated
• Chemical composition of most important CRT TV phosphors
• Red Phosphor Y2O2S:Eu
• Green Phosphor ZnS:Cu,Al,Au
• Blue Phosphor ZnS:Ag
• The two basic techniques for producing color displays with a CRT are:
1.Beam Penetration Method
2.Shadow Mask Method
• Advantage
• Economical way to produce colors
• Limitations:
• Generation of only four colors is possible
• Poor picture quality
A shadow Mask CRT has three phosphor color dots at each pixel location
One phosphor dot emits a red light, another emits green light and the last
one emits a blue light
This type of CRT also has three electron guns one for each color dot and a
shadow-mask grid which is pierced with small round holes in a triangular
pattern just behind the phosphor-coated screen
Prepared By: Asst. Prof. Sanjivan Satyal 79
2 types of arrangements are possible
• The phosphor dots in the triangles are arranged so that each electron
beam can activate only its corresponding color dot when it passes through
the shadow mask
• Yellow=Red+ Green
• Magenta=Red+Blue
• Cyan= Blue +Green
• These monitors use shadow mask method and take the intensity level for
each gun
• A RGB color system with 24 bits of storage per pixel is known as full color
system or true color system
• Limitations
• low resolution
• expensive
• 1. Emissive Display: The emissive displays are devices that convert electrical energy into light.
Examples are Plasma Panel, thin film electroluminescent display and LED (Light Emitting Diodes).
• 2. Non-Emissive Display: The Non-Emissive displays use optical effects to convert sunlight or light
from some other source into graphics patterns. Examples are LCD (Liquid Crystal Device).
Prepared By: Asst. Prof. Sanjivan Satyal 87
Plasma Panel Display:
• Different types of CAD applications are designed for medical and business
purposes
GKS supports the grouping of logically related primitives such as; lines,
polygons, character strings
GKS was widely adopted in the 1980s and 1990s for developing graphical
applications in various domains
• It is an extension of GKS
• Increased capabilities in object modeling, color specifications, surface
rendering, and picture manipulations are provided in PHIGS
• PHIGS include all primitives supported by GKS, in addition it also includes
geometric transformations (Scaling, Translation, and Rotation)
• Widely used in the 1980s for interactive 3D graphics applications
PHIGS+
• Enhanced version of PHIGS with additional features and improvements
• 3-d surface shading capabilities are added to the PHIGS