You are on page 1of 65

Computer Hardware for Graphics

Lecture 2
Input Devices

• Keyboard - Ideal for text.


• Mouse - popular and convenient for graphics.
• Data tablet - good for accurate digitalization of existing hard
copies as vector sets.
• Scanner - good for digitalization of existing hard copies as
pixel sets.
• Light pen - usually not as convenient as a mouse.
• Touch screen - more useful for menu selection than for
graphics.
• Joystick - useful for interactive graphics (games).
Processing: The Graphics Card

• Graphics card or video card is display adaptor or hardware component whose function is to generate
output images to display. It is also called as dedicated expansion card.
• Components contained on a graphics card include video memory, a RAMDAC and a GPU.
• A GPU is dedicated graphics processor optimized for floating point calculations which are fundamentals
to 3D graphics rendering.
• Graphics card has its own memory called Graphics memory or video memory.
• RAMDAC is Random access Memory Digital To Analog Convertor which converts digital signal to analog
signal for use by computer display which uses analog input such as CRT display.
Advantages of a GPU?
• The GPU’s advanced capabilities were originally used primarily for 3D game rendering .
But now those capabilities are being harnessed more broadly to accelerate
computational workloads in areas such as financial modeling, cutting-edge scientific
research and oil and gas exploration.
• To provide separate dedicated graphics resources including a graphics processor and
memory.
• To relieve some of the burden of the main system resources, namely the Central
Processing Unit, Main Memory, and the System Bus, which would otherwise get
saturated with graphical operations and I/O requests.
• The abstract goal of a GPU, is to enable a representation of a 3D world as realistically
as possible.
• So these GPUs are designed to provide additional computational power that is
customized specifically to perform these 3D tasks.
GPU vs CPU
• A GPU is tailored for highly parallel operation while a CPU executes programs serially.
For this reason, GPUs have many parallel execution units while CPUs have few
execution units .
• GPUs have significantly faster and more advanced memory interfaces as they need to
shift around a lot more data than CPUs.
• GPUs have much deeper pipelines (several thousand stages vs 10-20 for CPUs).
• the CPU is composed of a only few cores with lots of cache memory that can handle a
few software threads at a time. In contrast, a GPU is composed of hundreds of cores
that can handle thousands of threads simultaneously.
• Graphics processors (GPUs) provide a vast number of simple, data-parallel, deeply
multithreaded cores and very high memory bandwidths. the GPU is specialized for
compute-intensive, highly parallel computation – exactly what graphics rendering is
about – and therefore designed such that about 80% of transistors are devoted to data
processing rather than data caching and flow control

5
Selection of 3D Graphics – Related Software

• OpenGL : A cross-language, multi-platform application programming interface (API) for rendering2D and 3D vector graphics. The API is
typically used to interact with a graphics processing unit (GPU), to achieve hardware-accelerated rendering.
• CUDA : A parallel computing platform and programming model created by NVIDIA and implemented by the graphics processing
units (GPUs) that they produce. CUDA gives developers direct access to the virtual instruction set and memory of the parallel computational
elements in CUDA GPUs.
Using CUDA, the GPUs can be used for general purpose processing (i.e., not exclusively graphics); this approach is known as GPGPU.
Unlike CPUs, however, GPUs have a parallel throughput architecture that emphasizes executing many concurrent threads slowly, rather
than executing a single thread very quickly.
• Blender: A professional free and open-source 3D computer graphics software product used for creating animated films, visual effects, art, 3D printed
models, interactive 3D applications and video games
(Written in C, C++ and Python)
• WebGL: A JavaScript API for rendering interactive 3D computer graphics and 2D graphics within any compatible web browser without the
use of plug-ins. WebGL programs consist of control code written in JavaScript and shader code that is executed on a computer's Graphics
Processing Unit (GPU). WebGL is designed and maintained by the non-profit Khronos Group.
• DirectX: A collection of application programming interfaces (APIs) for handling tasks related to multimedia, especially game
programming and video, on Microsoft platforms. Originally, the names of these APIs all began with Direct, such as Direct3D, DirectDraw,
DirectMusic, DirectPlay, DirectSound, and so forth. The name DirectX was coined as shorthand term for all of these APIs (the X standing in
for the particular API names) and soon became the name of the collection.
• OpenGL ES
Blender
Relationship between CPU and GPU

 The GPU receives geometry information from the


CPU as an input and provides a picture as an output

8
Output Devices

Raster Devices
• CRT - the common display device for personal computers.
• LCD - A smaller, lighter, lower power replacement for the CRT.
• LED - A smaller, lighter, lower power replacement for the CRT.
• Plasma screens - a more expensive but brighter alternative to LCDs.
• Printers - today's printers are good for both text and graphics

Vector Devices
• Plotters - good for vector graphics.
• Oscilloscope - an early vector graphics output device
Graphics Hardware Devices

1. The Cathode Ray Tube


1. CRT
CRT

Introduction
• Dominant design used in the early VDDs.
• A beam of 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.
• 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.
CRT

Introduction
• 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.
• 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.
CRT
CRT
Refreshing the Screen

• Refresh rate: # of complete images (frames) drawn on the


screen in 1 second. Frames/sec.
• Frame time: reciprocal of the refresh rate, time between
each complete scan. sec/frame
Refresh rate
The number of times per second the image is redrawn.

• The entire contents of the frame buffer are displayed on the CRT at a rate high
enough to avoid flicker.
• This rate is called the .
• For a human to see a steady image on most CRT displays, the same path must be
retraced, or refreshed, by the beam at least 60 times per second.
• Current raster-scan displays perform refreshing at the rate of 60 to 80 frames per
second, although some systems now have refresh rates of up to 120 frames per
second.
• Refresh rates are described in units of cycles per second, or Hertz (Hz), where a
cycle corresponds to one frame
(i.e. a refresh rate of 60 frames per second = 60 Hz).
Refresh rate

• The display technology on a monitor is different from that of film.


– A film projector can maintain the continuous display of a film frame until the next frame is brought
into view.
– On a video monitor a phosphor spot begins to decay as soon as it is illuminated.

• On films, below 24 frames per second, we can perceive a gap between successive screen images.
– Old silent films show flicker because they where photographed at a rate of 16 frames per second.
– When sound systems were developed in the 1920s, motion picture film rates increased to 24
frames per second removing flickering.
– Today TV refresh rate is 25 frames per second in Europe and 30 frames per second in the USA.
CRT

The intensity is greater at the center of the spot, and it decreases with
Gaussian distribution out to the edges of the spot.

The maximum number of points that can be displayed without overlap on a


CRT is referred to as the resolution.
CRT

Control grid

• Intensity of the electron beam is controlled by setting


voltage levels on the control grid
• Since the amount of light emitted by the phosphor
coating depends on the number of electrons striking
the screen, we control the brightness of a display by
varying the voltage on the control grid.
CRT

Focusing
System Magnetic
deflection
Base coils

Phosphor
Coated
Screen

Connector
Pins
Electron
Gun Control
grid
voltage
CRT

Focusing system

• 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.
• 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.
CRT

Deflection coils

• As with focusing, deflection of the electron beam can be


controlled either with electric fields or with magnetic
fields.
CRT
Image generation
• When the electrons hit the phosphor coating, they are stopped and their kinetic
energy is absorbed by the phosphor.
• Part of the beam energy is converted by friction into heat energy, and the remainder
causes electrons in the phosphor atoms to move up to higher quantum-energy
levels.
• After a short time, the “excited” phosphor electrons begin dropping back to their
stable ground state, giving up their extra energy as small quantum’s of Light energy.
• What we see on the screen is the combined effect of all the electron light emissions:
a glowing spot that quickly fades after all the excited phosphor electrons have
returned to their ground energy level.
• 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.
CRT

Phosphor persistence
• Different kinds of phosphors are available for use in a CRT.
• Besides color, the difference between phosphors is their persistence: how long
they continue to emit light (that is, have excited electrons returning to the ground
state) after the CRT beam is removed.
• Phosphor persistence is defined as the time it takes the emitted light from the
screen to decay to one-tenth of its original intensity.
• Lower persistence phosphors require higher refresh rates to maintain a picture on
the screen without flicker.
• A phosphor with low persistence is useful for animation; a high-persistence
phosphor is useful for displaying highly complex, static pictures.
• Although some phosphors have persistence greater than 1 second, graphics
monitors are usually constructed with persistence in the range from 10 to
60microseconds.
CRT
Screen resolution

• The maximum number of points that can be displayed without


overlap on a CRT is referred to as the resolution.
• A more precise definition is the number of points per centimeter that
can be plotted horizontally and vertically, although it is often simply
stated as the total number of points in each direction.
• Resolution of a CRT is dependent on the type of phosphor, the
intensity to be displayed, and the focusing and deflection systems.
• High-resolution systems are often referred to as high-definition
systems.
CRT
Screen resolution
• A complete screen image consists of thousand of pixels & the screen
resolution is the maximum no. of displayable pixels.
• Higher the resolution, the more pixels can be displayed.
• Resolutions are different for different video standards as listed below :

• VGA : 640 x 480 (Horizontal vs Vertical)


• SVGA : 800 x 600
• XGA : 1024 x 768
• SXGA : 1280 x1024
CRT
Aspect ratio
• The aspect ratio gives the ratio of vertical points to horizontal points
necessary to produce equal-length lines in both directions on the screen.
• So 4:3 (most common) means that a vertical line plotted with 4 points
has the same length as a horizontal line plotted with 3 points.
CRT

The frame buffer


• The portion of memory reserved for holding the complete bit-mapped image that is sent to the monitor.
• The information in the memory buffer typically consists of color values for every pixel (point that can
be displayed) on the screen.
• Typically the frame buffer is stored in the memory chips on the video adapter (Graphics Card/
Accelerators) - A board that plugs into the PC to give it display capabilities.
• In some instances, however, the video chipset is integrated into the motherboard design, and the
frame buffer is stored in general main memory.
• An additional alpha channel is sometimes used to retain information about pixel transparency.
• The total amount of the memory required to drive the frame buffer depends on the resolution of the
output signal, and on the color depth and palette size.
• With a vector display, only the vertices of the graphics primitives are stored.
CRT

The frame buffer


• The depth (or intensity) of the frame buffer, defined as the number of bits that are
used for each pixel, determines properties such as how many colors can be
represented on a given system.
1-bit-deep frame buffer allows 21 colors (black and white)
8-bit-deep frame buffer allows 28 (=256) colors.
• In full color systems (also called RGB-color systems), there are 24 (or
more) bits per pixel in order to display sufficient colors to represent most
images realistically.
• Each bit plane requires the full complement of memory for a given raster resolution;
e.g.
a 3-bit plane frame buffer for a 1024 x 1024 raster requires 3,145,728 (3 X 1024 X1024) memory bits.
The frame buffer

0 800
0
x

pixel at address (x,y) spot at (x,y)


600
y
Frame buffer Display surface
31
at (800,600)
Graphics Devices

8. Flat Panel Devices


1. Cathode Ray Tube

9. Emissive devices Non-Emissive


Devices
3.Random (Vector) 5. Color Cathode Ray 2.Raster Scan
Scan Displays Tubes Displays
Plasma panels, thin-film Plasma panels,
electroluminescent LCDS
displays, Light-emitting
diodes, Flat CRTs
•Oscilloscope 6. Beam 7. Shadow
•Plotter Penetration Mask (Raster
4. DVST (Random scan) scan)
0 800

0
x

600

y
• Developed in the early seventies.
• It is today's dominant hardware technology.
• Almost all graphics systems are raster-based.
• A picture is produced as an array – the raster – of picture elements.
• These elements are called Pixels or Pels (Picture Elements).
• A pixel corresponds to a location, or small area, in the image.
• Collectively, the pixels are stored in a part of memory called the
refresh buffer or frame buffer.
• Electron beam “paints” the picture on screen one line at a
time. Scan line

Horizontal Vertical
retrace retrace

000000000000000000000
000000000111000000000
000000111111111000000
000111111111111111000
000111110000011111000
000111111111111111000
000111111000111111000
000111111000111111000
000111111000111111000
000111111000111111000
000111111111111111000
000000000000000000000
• Refresh rate = 60 to 80 frames per second.
• Each screen point is visited every refresh cycle.
• Their capability to store intensity information for each screen point
makes them well suited for the realistic display of scenes containing
shading and color patterns.
• Interlacing, scanning odd lines in whole screen then even lines, is
also used to reduce flicker.
• Can also use high-persistence phosphor to reduce flicker but causes
image smearing especially with significant animation.
• The frame-buffer with 1-bit intensity is called a bitmap.
• The frame-buffer with multiple-bits intensity is called a pixmap.
• Vector stands for line.
• Developed in the mid-sixties and in common use until the
mid-eighties.
• The electron beam is directed only to parts of the screen
where the picture is to be drawn.

MoveTo (300,800)
LineTo (700,800)
LineTo (500,300)
LineTo (300,800)
• Picture is stored as a set of point- and line-drawing commands with
(x,y) or (x,y,z) endpoint coordinates, as well as character-plotting
commands.
• Refresh rate depends on the number of lines to be displayed. To avoid
flicker it must be at least 30 times per second (30 Hz).
• They are designed to draw all the component lines of a picture 30 to 60
times per second – more than 60 could burn the phosphor.
• High quality vector systems are capable of handling approximately
100,000 lines at this refresh rate.
• They are designed for line drawing applications and cannot display
realistic shaded images.
Ideal line drawing Random scan
Raster scan

39
• Vector Device: oscilloscope
The P’s and I’s

• You may have seen the screen resolution described as something like 720p or 1080i.
What does that mean?
• the letters tell you how the picture is "painted" on the monitor. A "p" stands for
progressive , and an "i" stands for interlaced.
• An interlaced display paints all the odd lines first, then all the even lines.
• Since the screen is being painted in alternate lines, flicker has always been a problem
with interlaced scans.
• Manufacturers have tried to overcome this problem in various ways. The most common
way is to increase the number of times a complete screen is painted in a second.
• The most common refresh rate was 60 times per second, which was acceptable for most
people, but it could be pushed a bit higher to get rid of the flicker that some people
perceived.
• As people moved away from the older CRT displays, the terminology changed
from refresh rate to frame rate.
• The frame rate is the speed with which the monitor displays each separate
frame of data.
• The most recent versions of Windows set the framerate at 60 Hertz, or 60
cycles per second, and LED screens do not flicker.
• And the system changed from interlaced scan to progressive scan because the
new digital displays were so much faster.
• In a progressive scan, the lines are painted on the screen in sequence rather
than first the odd lines and then the even lines.
What about the numbers: 720p, 1080p, 1440p, 4K
and 8K?

• When high-definition TVs became the norm, manufacturers


developed a shorthand to explain their display resolution.
• The most common numbers you will see are 720p, 1080p and
2160p.

• The number always refers to the number of vertical lines on the


display.
• Here’s how the shorthand translates:
– 720p = 1280 x 720 - is usually known as HD or “HD Ready” resolution
– 1080p = 1920 x 1080 - is usually known as FHD or “Full HD” resolution
– e.t.c
•A vector display device.
•An alternative method for maintaining a screen image is to store the picture
information inside the CRT instead of refreshing the screen.
•It stores the picture information as a charge distribution just behind the phosphor-
coated screen.
• Flood cathode produces free electrons.
•The electron beam now writes to (i.e.stores a charge on) the storage grid:- this is
semi-permanent.
•The resultant charge on the grid attracts the electrons produced by the flood cathode
and these will pass the grid and hit the phosphor.
•High resolution (typically 4096x3120 pixels), but low contrast, low brightness and
difficulty in displaying colour.
•Two electron guns are used in a DVST.
•One, the primary gun, is used to store the picture pattern; the second, the flood gun,
maintains the picture display.
•Also makes use of high persistence phosphors.
Disadvantages and advantages compared to the refresh CRT.
•Because no refreshing is needed, very complex pictures can be displayed at very
high resolutions without flicker.
•However, they ordinarily do not display color and selected parts of a picture
cannot be erased.
•To eliminate a picture section, the entire screen must be erased and the modified
picture redrawn. The erasing and redrawing process can take several seconds for
a complex picture. For these reasons, storage displays have been largely replaced
by raster systems.
•Can be incrementally updated but not selectively erased; image has to be redrawn
on completely erased screen.
•To erase any part of the screen, we must erase all of the screen since we have to
destroy the charge on the storage grid. Therefore no good for interactive work
which requires selective erasure. But needs no memory nor computer power.
•Ideal for animation
• A color CRT monitor displays color pictures by using a
combination of phosphors that emit different-colored light.
• By combining the emitted light from the different phosphors, a
range of colors can be generated.
• The two basic techniques for producing color displays with a CRT
are the beam-penetration method and the shadow-mask method.
•Has been used with random-scan monitors.
•Two layers of phosphor, usually red and green, are coated onto the inside of the
CRT screen, and the displayed color depends on how far the electron beam
penetrates into the phosphor layers.
•A beam of slow electrons excites only the outer red layer.
•A beam of very fast electrons penetrates through the red layer and excites the
inner green layer.
•At intermediate beam speeds, combinations of red and green light are emitted to
show two additional colors, orange and yellow.
•Electron speed and hence color controlled by beam acceleration voltage.
•Inexpensive
•4 Colors maximum possible and Picture quality compromised
•Shadow-mask methods are commonly used in raster scan systems
(including color TV) because they produce a much wider range of
colors than the beam penetration method.
•A shadow-mask CRT has three phosphor color dots at each pixel
position.
•One phosphor dot emits a red light, another emits a green light, and the
third emits a blue light.
•This type of CRT has three electron guns, one for each color dot, and
a shadow-mask grid just behind the phosphor-coated screen.
• The three different colored phosphors (red, green, blue) are usually
arranged in triangular (delta) groups called triads.
• A metal screen with small holes – the shadow mask – allows
electrons from each gun to hit only corresponding phosphors dots (of
the proper color).

51
•The three electron beams are deflected and focused as a group onto
the shadow mask, which contains a series of holes aligned with the
phosphor-dot patterns.
•When the three beams pass through a hole in the shadow mask, they
activate a dot triangle, which appears as a small color spot on the
screen.
•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.
•Another Configuration for the three electron guns is an IN-LINE
ARRANGEMENT in which the three electron guns, and the
corresponding red-green-blue color dots on the screen, are aligned
along one scan line instead of in a triangular pattern.
•This in-line arrangement of electron guns is easier to keep in alignment
and is commonly used in high-resolution color CRTs.
•We obtain color variations in a shadow-mask CRT by varying the
intensity levels of the three electron beams.
•The color we see depends on the amount of excitation of the red,
green, and blue phosphors.
Color CRT Monitors

•High-quality raster-graphics systems have 24 bits per pixel in the


frame buffer.
•An RGB color system with 24 bits of storage per pixel is generally
referred to as a full-color system or a true-color system.
• All flat panel displays are raster refresh displays.
• The term flat panel display refers to a class of video
devices that have reduced volume, weight, and
power requirements compared to a CRT.
• A significant feature of flat-panel displays is that they
are thinner than CRTs, and we can hang them on
walls or wear them on our wrists.

55
• Current uses for flat-panel displays include:
– Small TV monitors
– Calculators
– Pocket video games
– Laptop computers,
– Armrest viewing of movies on airlines,
– Advertisement boards in elevators,
– Graphics displays in applications requiring rugged, portable
monitors.
• We can separate flat-panel displays into two categories:
emissive displays and non- emissive displays.
9. Emissive Displays
• The emissive displays (or emitters) are devices that
convert electrical energy into light.
• Plasma panels, thin-film electroluminescent
displays, and Light-emitting diodes are examples of
emissive displays.
• Flat CRTs have also been devised, in which electron
beams are accelerated parallel to the screen, then
deflected 90' to the screen.
• But flat CRTs have not proved to be as successful as
other emissive devices.
• It works by initially projecting the electron beam parallel to
the screen and then reflecting it through 90º.
• It has all the performance advantages of the conventional
CRT.
• Available only in small sizes.

58
ii. Light Emitting Diodes

• Another type of emissive device is the light-emitting diode


(LED).
• A matrix of diodes is arranged to form the pixel positions
in the display, and picture definition is stored in a refresh
buffer.
• As in scan-line refreshing of a CRT, information is read
from the refresh buffer and converted to voltage levels
that are applied to the diodes to produce the light
patterns in the display.
b. Non-emissive Displays

• Use optical effects to convert sunlight or light


from some other source into graphics patterns.
• Examples of a non-emissive flat-panel display is a
liquid-crystal device and plasma panels.
i) Plasma Panels
• Plasma panels, also called gas-discharge displays, are constructed by filling
the region between two glass plates with a mixture of gases that usually
includes neon.
• A series of vertical conducting ribbons is placed on one glass panel, and a
set of horizontal ribbons is built into the other glass panel. The intersection
of two conductors defines a pixel position.
• Firing voltages applied to a pair of horizontal and vertical conductors cause
the gas at the intersection of the two conductors to break down into glowing
plasma of electrons and ions.
• Picture definition is stored in a refresh buffer, and the firing voltages are
applied to refresh the pixel positions (at the intersections of the conductors) 60
times per second.
• One disadvantage of plasma panels has been that they were strictly
monochromatic devices, but systems have been developed that are now
capable of displaying color and grayscale.
• It is a flat panel display, which is a thin, lightweight display device.
• Liquid Crystal Displays (LCDS) are commonly used in small systems,
such as calculators and portable, laptop computers.
• It consists of an electrically-controlled light-polarising liquid trapped
in cells between two transparent polarising sheets.
• An electric current passed through the liquid causes the crystals to
align or not so that light can/cannot pass through them. Each crystal,
therefore, is like a shutter, either allowing light to pass through or
blocking the light.
• The term liquid crystal refers to the fact that these compounds have
a crystalline arrangement of molecules, yet they flow like a liquid.
Made up of six layers:
1. Vertical filter film to polarize the light as it enters.
2. Glass substrate with ITO electrodes which lines up with the vertical
filter. The shapes of these electrodes will determine the shapes on
the LCD.
3. Twisted liquid crystals.
4. Glass substrate with common electrode film (ITO) which lines up
with the horizontal filter.
5. Horizontal filter film to block/allow through light.
6. Reflective surface to send light back to viewer.
Task:

• Download and install BloodShed DevC++ or


Visual Studio on your computer.
• Set up OpenGL to work with software you
installed.
Practice Questions

Question 1
• Consider three different raster systems with resolutions of 640 by 480 ,1280 by 1024, and 2560 by 2048.
what size frame buffer (in bytes ) is needed for each of these systems to store 12 bits per pixel? How much
storage is required for each system if 24 bits per pixel are to be stored?

Question 2
• List the operating characteristics for the following display technologies: raster refresh systems, vector
refresh systems, plasma panels, and LCDs.

Question 3
• Beam deflection directs the beam to a specified point on the phosphor coated screen.
• This is accomplished either by electrostatic or magnetic deflection. Describe and explain how this is
achieved in a CRT.

Question 4
• Explain briefly on the five major elements for a Computer Graphics System.

You might also like