You are on page 1of 40

Chapter 2

Graphics Hardware

6-Mar-22 Computer Graphics Getie B. MAU – CS


Computer Graphics 2

Computer graphics deals with all aspects of creating images


with a computer.
❑ Hardware
- Input
- Output
❑ Software
- OpenGL or SVG using notepad++ like HTML
❑ Images

6-Mar-22 Computer Graphics Getie B. MAU – CS


Graphics Systems
3

A computer graphics system is a computer system to display pictures on PC


Six major elements - input devices, Central Processing Unit, Graphics
Processing Unit, memory, frame buffer, output devices,

Input devices Image formed in FB Output device

This model is general enough to include workstations and personal computers, interactive
game systems, mobile phones, GPS systems, and sophisticated image generation systems.
Frame buffer – special types of memory chips that enable fast redisplay of its contents:
Video Random-Access Memory (VRAM) or
Dynamic Random-Access Memory (DRAM).
❑ In simpler systems, frame buffer is part of standard memory.
Contd…
4

6-Mar-22 Computer Graphics Getie B. MAU – CS


Contd…
5

GPU (Graphics Processing Unit) – produce images for the display, with its
own graphics memory (or Video RAM or VRAM).
Pixels and Frame
- All modern displays are raster-based: a Rectangular array of points or dots or
pixels
- pixel has two properties: a color and a position
- Color is expressed in RGB components
- Position is expressed in terms of (x, y) coordinates
- origin (0, 0) - located at the top-left corner, with x-axis pointing right and
y-axis pointing down. This is different from the conventional 2D Cartesian
coordinates, where y-axis is pointing upwards.
- # of color-bits per pixel called depth (or precision) of the display
- number of rows by columns of the rectangular grid → resolution of the display
6-Mar-22 (range from 640x480 (VGA), 800x600 (SVGA), 1024x768 (XGA) to 1920x1080
Contd…
6

Frame Buffer and Refresh Rate


- Stores color values of the pixels are stored
- GPU writes the color value into the frame buffer
- The display reads color values from the frame buffer row-by-row, from
left-to-right, top-to-bottom, and puts each of the values onto the screen
→ raster-scan
- The display refreshes its screen several dozen times per second
→ refresh rate
- A complete screen image is called a frame

6-Mar-22 Computer Graphics Getie B. MAU – CS


Hardware Devices
7

Input Devices (Get information)


Output Devices (Give information)
Processing Device (Arithmetic/logic/repetition) - CPU
❑ Has three basic parts
- Arithmetic Logic Unit (ALU) - executes all the arithmetic and logic
instructions
- Control Unit -extracts instructions from memory, and decodes
instructions and determines which is next to be executed.
- Buses/Registers
▪ Buses are paths for information entering/exiting the CPU
▪ Registers are memory for processing information
6-Mar-22 Computer Graphics Getie B. MAU – CS
8
A. Graphics input devices
Keyboard
➢ Keyboards are used as entering text strings.
➢ It is efficient devices for inputting such a non-graphics data as picture label.
➢ Cursor control key’s & function keys are common features on general purpose
keyboards.
➢ Many other application of key board which we are using daily used of
computer graphics are commanding & controlling through keyboard etc.
Mouse
➢ Mouse is small size hand-held box used to position screen cursor.
➢ Wheel or roller or optical sensor is directing pointer on the according to
movement of mouse.
➢ Three buttons are placed on the top of the mouse for signaling the execution
of some operation.
Cont.…
9

Trackball: is ball that can be rotated with the finger or palm of the hand to produce
cursor movement.
Potentiometer attached to the ball, measure the amount and direction of
rotation.
They are often mounted on keyboard or mouse.

Space ball: is a graphical input device that is based on a fixed spherical ball.
hand held, non-movable
Space balls are used in 3D positioning and selection
operations in virtual reality system, modeling, animation,
CAD and other application.
Joystick: similar to the space ball – can be movable and non-movable
used for playing games
Contd…
10

Data glove: a glove with sensors


➢ is used to grasp virtual objects.
➢ The glove is constructed with series of sensors that detect hand and figure
motions.
➢ Electromagnetic coupling is used between transmitter and receiver antennas
which used to provide position and orientation of the hand.
➢ Input from the glove can be used to position or manipulate object in a
virtual scene.
➢ Used to control a virtual hand for grasping, dropping, and moving an object
in a virtual environment.

6-Mar-22 Computer Graphics Getie B. MAU – CS


Cont.…
11

Image scanner: picture, photo, or slides as images


Touch panel: highly transparent and embedded over a display surface.
allow displaying objects or screen-position to be selected with the touch or
finger.
Digital camera: stores photo shots as images on a diskette
Digital video recorder: input a video clip in digital form
Motion Capture: input full-body, facial, hand movements
Light pens: are pencil-shaped device used to select positions by detecting
light coming from points on the CRT screen.

6-Mar-22 Computer Graphics Getie B. MAU – CS


12
B. Graphics Output Devices
Used to translate data into a form that is readable by the user
Stereoscopic system:
it produce 3D effects by presenting different view to each eye of an
observer.
To obtain this we first need to obtain two views of object generated from
viewing direction corresponding to each eye.
We can construct the two views as computer generated scenes with
different viewing positions through glasses.

6-Mar-22 Computer Graphics Getie B. MAU – CS


13
Cont…
Virtual-reality: is the system which produce images in such a way that we feel that
our surrounding is what we are set in display devices but in actually it does not.
In virtual reality user can interact with the virtual environment.
A head set containing an optical system to generate the stereoscopic views
Sensor in the head set keeps track of the viewer’s position so that the front and back of
objects can be seen as the viewer “walks through” and interacts with the display.
Virtual reality can also be produce with stereoscopic glass and video monitor instead of
head set.
Sensor on display screen track head position and accordingly adjust image depth.

6-Mar-22 Computer Graphics Getie B. MAU – CS


Cont…
14

Plotter:-Plotters produce high quality color graphics output by using


pens for creating images. help to draw maps from stored data
Printer: Used to print documents on papers
Monitors: softcopy output device

6-Mar-22 Computer Graphics Getie B. MAU – CS


CRT
15

❑ Cathode-ray tube (CRT) Monitor – common display device (high


resolution, good color fidelity, high contrast, high update rates,…)

Can be used either as a line-drawing device (calligraphic) or to display


contents of frame buffer (raster mode).

6-Mar-22 Computer Graphics Getie B. MAU – CS


Contd…
16

Electron Gun: heated to send out electron’s.


An electron gun at the rear of the tube produce a beam of electrons which
is directed towards the screen of the tube by a high voltage typically 15000
to 20000 volts.
Inner side screen is coated with phosphor substance which gives light when it
is stroked bye electrons.
Control grid control intensity value of electron beams by setting voltage
levels.
The control grid voltage determines how many electrons are actually in the
electron beam.

6-Mar-22 Computer Graphics Getie B. MAU – CS


Contd…
17

Focusing System:
- The focusing system concentrates the electron beam so it converges to
small point when hits/strikes the phosphor coating.
- Electrostatic focusing is commonly used in computer graphics monitor
- electron beam will be focused properly only at the center of the screen

6-Mar-22 Computer Graphics Getie B. MAU – CS


Contd…
18

Deflection System: directs beam which decides the point where


beam strikes the screen.
- Deflection of the electron beam can be controlled either with electric fields
or with magnetic fields.
- Horizontal deflection plates: control the beams to scan from left to right and
retrace from right to left.
- Vertical deflection plate: control the beams to go vertically.

6-Mar-22 Computer Graphics Getie B. MAU – CS


Basic Operations of a CRT 19

Steps

1. electron gun emits a beam of electrons (cathode rays)


2. electron beam passes through focusing and deflection systems that
direct it towards specified positions on the phosphor-coated screen
- number of points displayed on a CRT is referred to as resolutions (eg.
1024x768)
3. When the beam hits the screen, the phosphor emits a small
spot/point of light at each position contacted by the electron
beam
4. Redraw the picture by quickly directing the electron beam back
over the same screen points.
Contd…
20

There are two techniques used for producing image on the


CRT screen:
- Raster scan display and
- Vector scan / random scan display

6-Mar-22 Computer Graphics Getie B. MAU – CS


i. Raster Scan Displays 21

Raster: A rectangular array of points or dots


Pixel: One dot or picture element of the raster. Its intensity range
for pixels depends on capability of the system
Scan Line: A row of pixels
Picture elements are stored in a memory called frame buffer

6-Mar-22 Computer Graphics Getie B. MAU – CS


Contd…
22

viewing screen is divided into a large number of discrete phosphor


picture elements, called pixels
Raster - the matrix of pixels
electron beam is swept across the screen, one row at a time from
top to bottom
- As the electron beam moves across each row, beam intensity is turned on
and off to create a pattern of illuminated spots
Picture definition is stored in a memory area called refresh buffer
or frame buffer.
- holds the set of intensity values for all the screen points
Stored intensity values then retrieved from refresh buffer and
“painted” on screen one row (scan line) at a time
6-Mar-22 Computer Graphics Getie B. MAU – CS
Contd…
23

Electron beam “paints” the picture on screen one line at a


time. Scan line

Horizontal Vertical
retrace retrace

e.g., Home television


sets and printers are
other examples
000000000000000000000
000000000111000000000
000000111111111000000
000111111111111111000
000111110000011111000
000111111111111111000
000111111000111111000
000111111000111111000
000111111000111111000
000111111000111111000
000111111111111111000
000000000000000000000

6-Mar-22 Computer Graphics Getie B. MAU – CS


ii. Random-Scan (Vector) Displays
24

Uses an electron beam which operates like a pencil to create a line


image on the CRT.
The image is constructed out of a sequence of straight line segments
Each line segment is drawn on the screen by directing the beam to
move from one point on screen to the next, where each point is
defined by its x and y coordinates
After drawing the picture, system cycles back to the first line and
design all lines of the picture 30 to 60 time each second
CRT has the electron beam is directed only to parts of the screen
where the picture is to be drawn
6-Mar-22 Computer Graphics Getie B. MAU – CS
Contd…
25

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)
Refresh rate depends on the # of lines to be displayed
Picture definition stored as a set of line-drawing commands in an area
of memory referred → refresh display file

MoveTo (300,800)
LineTo (700,800)
LineTo (500,300)
LineTo (300,800)

6-Mar-22 Computer Graphics Getie B. MAU – CS


Contd… 26

Ideal line drawing Raster scan Random scan

6-Mar-22 Computer Graphics Getie B. MAU– CS


Raster scan vs Random Scan 27

6-Mar-22 Computer Graphics Getie B. MAU– CS


28
Raster Display Frame Buffer
• Picture definition is stored in a memory area called the frame buffer.
• This frame buffer stores the intensity values for all the screen points called a
pixel.
• On black and white systems, the frame buffer storing the values of the pixels
is called a bitmap or bit plane.
• Each entry in the bitmap is a 1-bit data which determine the on (1) and off
(0) of the intensity of the pixel.
• A 1024 by 1024 element square raster requires in a single bit plane.
Since a memory bit has only two states 0 and 1.
• A Single bit plane yields a black and white display.
• DAC- Convert the digital representation into analog signal.
Qu 1. How much memory is needed for a 1024 x 1024 raster display using Black and
White color frame buffer?

6-Mar-22 Computer Graphics Getie B. MAU– CS


29
Raster Display Frame Buffer

6-Mar-22 Computer Graphics Getie B. MAU– CS


30
Raster Display Frame Buffer
Gray Scale Levels
▪ Grayscale is an in which the value of each pixel carries only intensity information.
▪ The darkest possible shade is black, and the lightest possible shade is white.
▪ Bit values are loaded from each N planes to a register, the resulting number is
interpreted as intensity level b/n 0 and
▪ This is converted to analog voltage b/n 0 and the max. voltage of the electron gun
by the DAC.
▪ Qu 1. How much memory is needed for a 1024 x 1024 raster display using
3 bit plane gray level frame buffer?

6-Mar-22 Computer Graphics Getie B. MAU– CS


31
Raster Display Frame Buffer

6-Mar-22 Computer Graphics Getie B. MAU– CS


32
Raster Display Frame Buffer
primary Color

6-Mar-22 Computer Graphics Getie B. MAU– CS


33
Raster Display Frame Buffer

Q.1. How much memory is needed for a 1024 x 1024 raster display using
true color frame buffer?
Q.2. If each pixel has different color how many colors will be on the
screen?
34
Cont…
Solution
1. True color frame buffer(24 bit per pixel)
⇒ 1 pixel = 24 bit of memory and also
⇒ Resolution= 1024 x 1024
Resolution: The maximum number of points that can be displayed
without overlap on a CRT.
Then, the size of frame buffer = Resolution x bits per pixel
= (1024 x 1024) x 24 bits
= 3MB ( ∵ 1M=1024 x 1024 bits and 3B=24 bits)
2. If each pixel has different color:
∴ #colors on the screen = #pixels of the screen
(i.e. 1024x1024 ≈ 1 million colors).
CRT
35

❑ CRT monitor displays color pictures by using a combination


of phosphors that emit different color lights.
❑ Methods
1. Beam Penetration
2. Shadow Mask

❑ Discuss briefly about these methods? (5%)

6-Mar-22 Computer Graphics Getie B. MAU– CS


3D Graphics Rendering Pipeline
36

Pipeline – a series of processing stages


in which the output from one stage
is fed as the input of the next stage,
similar to a factory assembly line or
water/oil pipe
Rendering - process of producing image
on the display from model description

3D Graphics Rendering Pipeline accepts description of 3D objects in


terms of vertices of primitives (such as triangle, point, line and quad),
and produces the color-value for the pixels on the display
6-Mar-22 Computer Graphics Getie B. MAU– CS
Contd…
37

Fig. The graphics pipeline’s stages and mappings

6-Mar-22 Computer Graphics Getie B. MAU– CS


Contd…
38

Modeling Transformation - Orientation and arrangement of objects in 3D


world
Viewing Transformation - Create 3D scene from “camera” point of view
Clipping - Discard unnecessary objects that fall outside the camera's view
Projection Transformation - Transform 3D scene to 2D
Rasterization - Convert image into pixels
Texturing - Assign colors to each pixel
Display - Display images or scene onto a computer display

6-Mar-22 Computer Graphics Getie B. MAU – CS


Assignment-1-10%
• Make a group of (5) students and prepare a summary report
that shows comparison of display devices listed below
– Cathode Ray Tube (CRT) Displays
– Liquid Crystal Display (LCD)
– Plasma Display Panels
– Light-emitting diode (LED) Displays
– Organic Light-emitting diode (OLED) Displays
– LED-backlight LCD

39
40

6-Mar-22 Computer Graphics Getie B. MAU– CS

You might also like