Download Introduction to Computer Graphics

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Output devices
COMP 3003
University College Dublin
1
Hardware Issues (Display Technology)

Different output devices may be used - monitors, printers, plotters

Most common is the Cathode Ray Tube (CRT) monitor
–
Horizontal and vertical deflectors focus an electron beam
emitted by an electron gun on any spot on a phosphor coated
screen
–
The maximum number of points, or pixels that can be displayed
without overlap is called the resolution, e.g. 1024x768,
800x600 etc.
–
Colour systems have groups of 3 different phosphors, for red,
green and blue (the primary colours)
–
The CRT uses a combination of these phosphors to emit
different coloured light
University College Dublin
2
Phosphors
 Once
struck by the electron beam most phosphors
relax back to the ground state by emitting a photon
of light
 This
light is called fluorescence, which normally
decays in under a millisecond
 Some
molecules may be further excited, and emit a
light call phosphorescence, which decays slower,
but still rapidly (15-20 milliseconds)
 Therefore,
the screen must be refreshed by
redrawing the image
University College Dublin
3
Phosphors
 So
phosphors may be characterised by their
persistence
– (time to decay of emitted light)
 High
persistence cheap and good for text, bad for
animation (original IBM PC monitor)
 Low
persistence, good for animation, but needs a
high refresh rate or flicker can be observed
 50-60
Hz is usually sufficient to avoid flicker
University College Dublin
4
CRT
Interior metallic coating at
high positive voltage
University College Dublin
5
CRT
E GUN
Produces constant stream of electrons
Control Grid
Sets intensity of spot on screen (the more negative
Focusing
System
Forces e-beam into narrow stream (otherwise
repel)
Deflection
Coils
Indicates target phosphor spot
the control grid voltage the fewer electrons pass through)
High
positive
V coating
University College Dublin
15- 20,000 V Accelerates e-beam to screen
6
Vector and Raster
 Two
common techniques are used to draw the
graphic on the screen
–
Vector and Raster
 Vector
was developed in the mid-sixties and was in
common use until the mid-eighties
 Raster
was developed in the early seventies and
today has mostly replaced vector based systems
University College Dublin
7
Vector (Random) Scan System



The electron beam directly draws the picture
Refresh rate depends the number of lines drawn
The picture definition is stored as a set of line-drawing
commands in the memory called the refresh display file
–


To display the picture the system cycles through the set of
commands in the display file
Good for line-drawing applications CAD
–

also known as display list, display program or refresh buffer
not good for shading etc
Also good for smooth curved surfaces
–
e.g. oscilloscope
University College Dublin
8
Vector (Random) Scan System (cont)
 Advantages
are high resolution, easy animation, and
requires little memory (just display program), e.g:
b
a
Turn e beam off, move to a.
Turn e beam on and draw to b.
Repeat move draw sequence.
 Disadvantages
are limited colour capability and flicker
occurs as complexity of image increases.
University College Dublin
9
Raster Scan Devices
 Scans
the screen from top to
bottom in a regular pattern
(common TV technology)
 A Raster is a matrix of pixels
(picture elements) covering
the screen
 The electron beam is turned
on/off so the image is a
collection of dots painted on
screen one row (scan line) at
a time.
University College Dublin
10
Frame Buffer
 The
image information is stored in a special
graphics memory area called a frame buffer (or bit
map for b/w)
 Each memory location corresponds to a pixel
 A display processor scans this memory controls the
electron beam at each pixel accordingly
 For a monochrome system, each pixel is either on or
off, so only one bit per pixel is required, and the
electron beam is either on or off
 For grey scale (single electron gun), 8 bits per pixel
gives 256 (28) different intensities of grey
University College Dublin
11
Accessing the Frame Buffer







Frame-buffer locations, and the corresponding screen
positions, are referenced in Cartesian co-ordinates
Two registers are used to store the co-ordinates of the screen
pixels (x,y)
Initially x and y are set to zero
The associated value is retrieved and used to set the
intensity of the electron guns
Then x is incremented by 1 and process is repeated for the
next pixel until the complete row has been scanned
Then set x to zero increment y and start again
After cycling through all the pixels start at 0,0 again
University College Dublin
12
Aliasing and Anti-aliasing
 In
raster systems curved primitives such as circles
can only be drawn by approximating them with
pixels on a raster grid
–
jaggies or staircasing
 This
effect is a manifestation of a sampling error
called aliasing
 Anti-aliasing is a technique by which neighbouring
pixels at edges of primitives are set to graduating
levels of intensity
–
I.e. not set to maximum or zero
University College Dublin
13
Aliasing and Anti-aliasing
 Sampling
University College Dublin
Technique ?
14
Aliasing and Anti-aliasing - Examples
University College Dublin
15
Colour Raster Scan System
3
Electron guns used, for R G and B
 Each pixel consists of 3 dots of phosphor, arranged
as triangle (triads)
 Combining different intensities of these phosphors
can generate different colours
University College Dublin
16
High-Quality Raster Graphics
 High-quality
raster systems have three electron
guns which can have a variety of settings
 For example 8 possible settings per gun
–
–
–
allowing 256 voltage settings for each colour electron gun
in total 16,777,216 (256 * 256 * 256) or 17 million approx.
possible colours for each pixel
24 bits used for each pixel
 These
systems are generally referred to as fullcolour or true-colour systems
University College Dublin
17
Windows NT Example
Palette
Number
of pixels
Refresh Frequency
University College Dublin
18
Colour Lookup Table
 In
many colour raster systems, the display controller
includes a colour lookup table (LUT)
 The value of a pixel in the frame buffer is not used to
directly control the beam, but is an index into the
LUT
 The entry in the LUT is used to directly control the
colour of the pixel e.g.
–
–
–
–
–
–
1 byte (8 bits) per pixel in frame buffer
This gives address for 256 (28) entries in the LUT
Each entry in the LUT is 24 bits (8 bits per primary colour)
So 256 (28) colours out of 17 million available colours
The application set up the LUT as required
Provides a fast method of controlling beam intensity
University College Dublin
19
Raster Scan System: conclusion
 Advantages
–
–
–
of Raster Scan systems:
Low cost (memory has become cheap)
Refresh rate independent of image complexity
Can handle colour and filled areas
 Disadvantages
–
Uses more memory
»
–
–
Over come by some degree by using an LUT
Mathematical models of objects must be scan converted
by the host processor
aliasing
University College Dublin
20
Direct View Storage tube (DVST)
 Similar
to standard CRT except image is stored as a
distribution of charges on the inner side of the
screen.
 Advantages:
– No Constant Refresh Required
 Disadvantages:
– To update any part of image must redraw all
University College Dublin
21
Liquid Crystal Display (LCD)
 Used
in flat panel displays (reduced
volume, weight and power
requirements
 Called non-emissive: they do not
covert electrical energy into light but
use optical effects to convert light into
graphical patterns
 Polarised light is passed through a
liquid crystal material whose
molecules can be aligned to block or
transmit the light
University College Dublin
22
Liquid Crystal Display (LCD)
 Orientation
of molecules controls
polarization of light
 Current forces allignment of molecules
 Light can’t pass – absorbed – black.
 Current applied using 2 grids to give
X, Y co-ords
University College Dublin
23
Liquid Crystal Display (LCD)
 Liquid
crystal: material that has
crystalline arrangement of molecules
but flows like a liquid
 It is a (nematic) threadlike material
that tends to keep the long axes of the
rod-shaped molecules aligned
University College Dublin
24
Liquid Crystal Display (LCD)
 The
light entering through the front
layer is polarised vertically
 If the molecules are arranged in a
spiral fashion, they rotate the direction
of the light by 90 degrees. Then the
light passes through
 If the crystals are in an electrical field
they do not change the direction of the
light and the light does not pass
University College Dublin
25
University College Dublin
Vertical
Polarizer
Vertical
Grid Wires
Liquid
Crystal Layer
Horizontal
Grid Wires
 Six
Horizontal
Polarizer
Reflective
Layer
Liquid Crystal Display (LCD)
Layers
Viewing
Direction
26