Вы находитесь на странице: 1из 31

Computer Graphics

CS 362

CG Hardware Basics

Samit Bhattacharya
Representations in graphics
• Vector (random-scan, stroke-writing or calligraphic)
Graphics
– Image is represented by continuous geometric objects: lines, curves,
etc.
– Early computer displays: basically an oscilloscope

• Raster Graphics
– Image is represented as a rectangular grid of coloured squares
Vector graphics
Display list
continuous & smooth move 10 20
lines
no filled objects line 20 40
random scan
...
refresh speed depends
on complexity of the
char O
scene
VECTOR
char R

Display Controller
Vector graphics
• Graphics objects: geometry + colour
• Complexity ~ O(number of objects)
• Geometric transformation possible without loss of information
(zoom, rotate, …)
• Good for diagrams, schemes, ...
• Examples: PowerPoint, CorelDraw, ...

Two disadvantages
– Just does wireframe
– Complex scenes: visible flicker
Raster graphics
• Raster Displays
– Raster: A rectangular array of points or dots
– Pixel: One dot or picture element of the raster
– Scan line: A row of pixels
Raster graphics
• Raster Displays
– Black and white television: an oscilloscope with a fixed scan
pattern: left to right, top to bottom
– To paint the screen, computer needs to synchronize with the
scanning pattern of raster
• special memory to buffer image with scan-out synchronous to
the raster. We call this the framebuffer (or refreshbuffer).
Raster Graphics

Frame buffer

0 0 0 0 0 0
0 7 7 7 6
Video Controller
0 7 7 7
0 0 0 RASTER

0 0
0
jaggies (stair casing) refresh speed independent of scan conversion
scene complexity
filled objects resolution
pixel
(anti)aliasing bit planes
Raster Graphics
• Generic
• Image processing techniques
• Geometric Transformation: loss of information
• Complexity ~ O(number of pixels)
• Jagged edges, anti-aliasing
• Realistic images, textures, ...
• Examples: Paint, PhotoShop, ...
Conversion
Vector graphics

Rasterization, Pattern recognition

Scan conversion

Raster graphics
Graphics Devices

• Output Devices
– Video Displays Display
CPU DP
– Hard Copy Devices

• Input Devices
Input Hard Copy
– Mouse
– Keyboard
– Stylus
– joystick
DP (Display Processor)
CPU DP Display

Input Hard Copy

• Why DP ?
– Scan conversion
– Refreshing screen
– Interfacing with interactive input devices
– Raster operations
– Character generation
– Additional functions
Video Displays
Cathode Ray Tubes (CRTs)
– Most common display device today
– Evacuated glass bottle
– Extremely high voltage
– Heating element (filament)
– Electrons pulled towards
anode focusing cylinder
– Vertical and horizontal deflection
plates
– Beam strikes phosphor coating on
front of tube
Electron Gun
• Contains a filament that, when heated, emits a stream of
electrons
• Electrons are focused with an electromagnet into a sharp
beam and directed to a specific point of the face of the
picture tube
• The front surface of the picture tube is coated with small
phosphor dots
• When the beam hits a phosphor dot it glows with a
brightness proportional to the strength of the beam and how
often it is excited by the beam
Phosphors
• Fluorescence: Light emitted while the phosphor is being
struck by electrons
• Phosphorescence: Light emitted once the electron beam
is removed
• Persistence: The time from the removal of the excitation
to the moment when phosphorescence has decayed to 10%
of the initial light output

•CRT screen resolution depends on phosphor spot


intensity distribution (Gaussian)
Refresh CRT (Vector CRT)

Input

CPU DPU CRT

Refresh
(Display file)
buffer
• random access
• flicker-free
• static (no selective erasing)
Raster-Scan Display
• Frame must be “refreshed” to draw new images
• As new pixels are struck by electron beam, others are
decaying
• Electron beam must hit all pixels frequently to eliminate
flicker

• Critical fusion frequency


– Typically 60 times/sec
– Varies with intensity, individuals, phosphor
persistence, lighting...
Raster-Scan Display
• Scanning (left to right, top to bottom)
 Vertical Sync Pulse: Signals the start of the next frame
 Vertical Retrace: Time needed to get from the bottom of the
current frame to the top of the next frame
 Horizontal Sync Pulse: Signals the start of the new scan line
 Horizontal Retrace: The time needed to get from the end of the
current scan line to the start of the next scan line
Raster-Scan Display
input
CPU DP CRT

pixel

Frame Buffer
Pixel = Picture element (bit-map)

Fixed frame buffer size


Independent of picture complexity
(a) (b)

(c) (d)
A raster-scan system displays an object as a set of points across
each screen scan line
Interlacing
• Assume can only scan 30 times / second

• To reduce flicker, divide frame into two “fields” of odd


and even lines

1/30 Sec 1/30 Sec


1/60 Sec 1/60 Sec 1/60 Sec 1/60 Sec
Field 1 Field 2 Field 1 Field 2
Frame Frame
Interlacing

1
2
3
4
5
6
7
8
Color CRTs
• Color CRTs are much more complicated
– Requires manufacturing very precise geometry
– Uses a pattern of color phosphors on the screen:
• Color CRTs have
– Three electron guns
– A metal shadow mask to differentiate the beams

Why red, green, and blue phosphors?


Color CRT (Shadow Mask)
Shadow Mask

Electron Gun

Screen

Phosphor dot pattern

Different phosphor for each color !!!


Delta-delta shadow-mask CRT Precision in-line delta CRT
Color Image Generation Techniques

• Direct coding
– RGB values directly stored for each pixel
– Memory intensive

• Color lookup table - a compromise technique


– Each pixel points to a location in a table
– Saves space
Color Lookup Table

colour R G B
Frame buffer index
0 0 0 0
0 0 0 0 0 0
0 7 7 7 6 CLUT:
1 102 255 53
0 7 7 7 pixel = code
2 255 255 204
0 0 0
0 0 4 255 102 153 True color:
0 ...
pixel = R,G,B
7 102 0 51
Others
• Flat panel displays (LCD, Plasma)
• Digital Micromirror Devices (projectors) or Digital Light
Processing
• Organic Light-Emitting Diode (OLED) Arrays
• Display wall/situated displays
• 3D displays
• Stereoscopic displays
• Hard Copy Display
– Printers (dot matrix, ink jet, laser)
– Plotter (electrostatic, thermal, pen and ink)
– 3D-printer
Input Devices
• Physical devices
– Keyboard
– Light pen
– Mouse/ joystick/ trackball
– Dials
– Touch panels
– Buttons
– Graphic tablets (2D, 3D)
– Voice recognition systems
Graphic Devices

Output Input

Display monitors Projection Hard copy display


(CRT, LCD, technologies (printers, plotters)
Plasma)