Sie sind auf Seite 1von 85

Computer Graphics

and its Components

The Programmers Model of Interactive Graphics

CG (Cont)
Application
Data
Structures

Application
Programs

Graphics
Systems

Graphics Devices
Application Data Structures / Models
Application Programs
Graphics Systems
Graphics Devices

Users
(operators)

1. Graphics Devices

Output Devices
Display Devices
Hard Copy Devices

CPU

DP

Display

Input

Hard Copy

Input Devices
Locator
Stroke
String (Keyboard)
Valuator
Choice (Button)
Pick

1.1 Output Devices


CRT Displays

Input
CPU

Memory

CRT Basics
DP
DVST (Direct View Storage Tube)
Refresh Display
Raster - Scan Display
Others

DP

Display

Hard Copy

CRT Basics
Focusing
System

Horizontal
Deflection
Plate

Heating
Filament

Cathode

Electron Beam

Control Accelerating
System
Grid

Vertical
Deflection
Plate

PhosphorCoated
Screen

CRT Basics

Intensity of the electron beam is controlled by setting


voltage levels on the control grid, which is a metal cylinder
that fits over the cathode.

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

A 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.
The beam-penetration method for displaying color
pictures 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.

Shadow-mask methods are commonly used in rasterscan


systems (including color TV) because they produce a much
wider range of colors than the beampenetration method. A
shadow-mask CRT has three phosphor color dots at each pixel
position. One phosphor dot emits a red light, another emifs 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.

Refreshing
Intensity

10 %
Persistence

Refresh rate
# of times/sec a picture is redrawn
60 Hz for raster scan displays

Time

Sharpness
inter-dot distance
(dot pitch)

dot size (spot size)

energy
1

spot size

0.5 ~ 0.6

distance
electron beam

Resolution = 1 / spot size


However, informally
# of pixels / scan line
# of lines / frame
Addressability = 1 / inter-dot distance

The effect of cross-sectional spot intensity on resolution

The effects of various ratios of the dot size to the interdot distance

Aspect Ratio
The aspect ratio of a display device is the ratio of the number of vertical points to that of horizontal points
necessary to produce equal length of lines in both direction on screen

4/3 = 1.33...
l

Note
Sometimes, aspect ratio is stated in terms of the ratio of
horizontal to vertical points
3/4 = 0.75

DP (Display Processor)
CPU

Memory

CRT

DP

Input

Why DP ?
Scan conversion
Refreshing
Raster operations
Character generation
Interfacing with interactive input devices

Refresh CRT (Vector CRT)

MOVE
10
15
LINE
100
25
CHAR
LU
CY
LINE

JMP

Refresh buffer memory

Interface to
host computer

(Display commands)

Display
processor

(interaction data)

CRT
Stylus

Alphanumeric keyboard

Data tablet

Input
CPU

DPU

Refresh
buffer

CRT

(Display file)

What is the display file ?


DPU program !!!
What if a picture is complicated ?
Longer DPU program !!!
The size of the refresh buffer limits the complexity of a picture

Dynamic picture update


Selective erasing
A complex picture may cause flickering !!!

Refresh rate

30 frame / sec
depending on the
complexity of a picture

DVST (Direct View Storage Tube)


Interface to host computer
(Display commands)

(interaction data)

Display
processor
CRT
Vertical and
Horizontal cursor
thumbwheels

Keyboard

CPU

DPU

CRT

Input devices
No refresh buffer !!!
Flood Gun

Why ?

Screen
Storage Grid
Collector Grid

Primary
Electron
Gun

random access
flicker-free
static (no selective erasing)

Raster-Scan Display
Interface to host computer
(Display commands)

00000000000000000000000001000000
00000000000000000000000001000000
00000000000000000000000111110000
00000000011000000001111111111111
00000000111100000000000111110000
00000011111111000000000001000000
00001111111111110000000001000000
00111111111111111100000000000000
00011111111111111000000000000000
00011111111111111000000000000000
00011111111111111000000000000000
00000000000000000000000000000000

Frame buffer

(interaction data)

Display
processor
CRT

Keyboard
Data input

input
CPU

DP

CRT
pixel

Pixel = Picture element

Frame Buffer
(bit-map,pixmap)

Selective erasing
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

1
2
3
4
5
6
7
8

NTSC (National Television System Committee)


Frame
Odd scan line field

Even scan line field

Visible odd
scan lines

Odd scan line


vertical retrace

Visible even
scan lines

Even scan line


vertical retrace

241 1/2 lines

21 lines

241 1/2 lines

21 lines

262 1/2 lines

262 1/2 lines


525 lines

Aspect ratio
3

644
483

Refresh rate : 30 Hz

17% of time for a scan


line is used for
horizontal retrace

PAL
SECAM

Frame buffer for B/W display

Register

DAC

Frame Buffer

CRT Raster

Frame buffer for N-bit nanochrome display

Register
N
0 1 0

N=3
Frame Buffer

2N DAC

2N Levels
CRT Raster

Palette(look-up table)
Look-up tables
W

2W intensity levels
2N at a time

1 01 0

10

2N entries

0 1 0

W=4

2
2W DAC

N=3

Frame Buffer

2N levels

CRT Raster

Frame buffer for color CRT


Black
Red
Green
Blue
Yellow
Cyan
Magenta
White

Red

Green

Blue

0
1
0
0
1
0
1
1

0
0
1
0
1
1
0
1

0
0
0
1
1
1
1
1

Registers

N=3
Frame Buffer

DAC

Blue

DAC

Green

DAC

Red

2N Levels
CRT Raster

Simple Raster Display System


Peripheral
devices

CPU

scan conversion
memory access

System bus

System
memory

Frame
buffer

Video
controller

Monitor

Raster Display System with Display Processor


Peripheral
devices

CPU

System bus

Display
processor

Display
processor
memory

Frame
buffer

System
memory

Video
controller

scan conversion
raster operations
Character generation
I/O transfer on the system bus

Monitor

Single-Address-Space Raster Display System

CPU

DP

Peripheral
devices

System bus

System
memory

Frame
buffer

Video
controller

Monitor

cache memories
video RAM (VRAM)
(read out all pixels
on a scan line in
one cycle)

LCD ( Liquid Crystal Display ) Basics

Viewing
direction
Reflective
layer

Horizontal
polarizer

Horizontal
grid wires

Liquidcrystal
layer

Vertical
grid wires

Vertical
polarizer

Color TFT (Thin Film Transistor) LCD


Color ?

Color Filter
Liquid Crystal

TFT

TFT (Thin Film Transistor)


using a transistor at each grid point
causing the crystals to change their state quickly
controlling the degree to which the state has been changed
holding the state until it changes

Other Display Devices


Plasma-Panel Displays
Laser Devices
Three-Dimensional Monitors
HMDs

Hard Copy Displays


Printers
Plotters
3D-printers

1.2 Input Devices


Physical Devices
Logical Devices
Input Modes

Request mode
Sample mode
Event mode

Physical Devices

Keyboards

Dials

Touch Panels

Light Pens

Graphics Tablets

3D-Tablets

Joysticks / Mice / Trackballs

Buttons

Voice Systems

Logical Devices
Locator
Stroke
String
Valuator
Choice
Pick

Locator Devices / Stroke Devices

String Devices

y+

(a)

y - axis

(b)

Valuator Devices

90

0.5
0

180

-0.5
-1

270

5000

Choice Devices
Buttons
Menu Selection

Pick Devices
Bounding
Rectangle

ymax

ymin
xmin

xmax

d2

d1
(x,y)

2. Graphics Systems

Interface between application programs and graphics devices


Consisting of input subroutines and output subroutines
accepting input data from input devices and draw pictures on
output devices, respectively

2.1 Overview
ACM Core,
GKS, GKS-3D
CGI (device interface)
CGM (metafile)
PHIGS (3D and realtime)
PHIGS+
X-window
OpenGL
PEX
DirectX

Application program
Graphics system
Operating system
Input and
output devices

Graphics
hardware

Metafiles

2.2 OpenGL

API (Application Programmer Interface) to interactive 3D rendering

State machine to facilitate a 3D rendering pipeline


Client-server model

250 distinct commands


To drive the rendering pipeline
To control the state of the pipeline by a set of parameters

No input commands

2.3 Client-server Model

Clients (Application) issue commands

The server (OpenGL) interprets and processes commands

Frame buffer configuration taken care of by a window system

2.4 OpenGL-related Libraries

Window tasks
Input devices
Complicated shapes
OpenGL Utility Library (GLU)
Window system support libraries
GLX / WGL / PGL

OpenGL Utility Toolkit (GLUT)


Fahrenheit Scene Graph (FSG)

For portability, there are


no commands for these.

2.5 DirectX

Direct control of graphics hardware


Direct control of input devices, and sound

Application
Applicationprogram
program

Windows
WindowsAPI
API

Direct input
Direct sound

..

Windows
Windowssystem
system

Direct X

Direct graphics

Platform for Course Projects

PC / MS Windows
Visual C++
OpenGL

3. Application Data Structures/ Models


3.1 Hierarchical Representation

objects: A B C
geometric data
non-geometric data

Application Data Modeling (Cont)

OBJ

F1

F2

E1 E2 En
V1

V2

Fk

Em
Vr

3.2 Geometric Modeling

Definition
A collection of methods to define geometric and topological

characteristics of an object

Three well-known geometric models


wireframe models
surface models
solid models

Wireframe Models

Primitives: points and lines


Applications: 2D CAD/CAM, Drafting

P4

P3
P2

P1

P7

P8
P5

P6

Simple and efficient


Ambiguous

VLSI Design (design rule check)

Surface Models

Primitives: points, lines and patches


Applications: representation of sculptured surfaces, tool path calculation

Accurate representation of curved surface


Cannot represent a true 3D volume

Machining

Solid Models
U

Solid

Boundary representation

CSG representation

Shading & visibility determination


Mass properties calculation
Interference test

Feature Extraction

What is feature?
How can you extract feature?

Alternating Sum of Volumes


1

HULL(1)

H1

H1 - 1
2

HULL(2)

H2

H2 - 2
3

HULL(3)

H3

H3 - 3
Homework #1

CSG-Tree

H2

H1

H1 - H2

H3

H3

Assembly
E
A

How can you disassemble OBJ?

E
F
C
A
B
D

Can you obtain


an assembly sequence from it?

Swept Volume
Z

Z
sweep
sweep

Y
Y
X

Object Decomposition

Octree Representation

Examples
Modeler
-- CATIA
CATSOFT
DOM-SOLIDS
-- EUCLID
-- GEOMOD-II
ICEM SOLID MODELING
ICM GMS
MEDUSA
-- PADL-1.2
-- PATRAN-G
ROMULUS
SOLIDESIGN
SOLID MODELING-II
SYNTHAVISION
-- TIPS-1
UNIS-CAD
UNISOLIDS

Vendor/Distributor

Core Software

Genre

IBM
CATRONIX
CALMA
MATRA DATAVISION/DEC
SDRC/GENERAL ELECTRIC CAE
CDC
ICM
PRIME
U. ROCHESTER
POA ENGINEERING
EVANS & SUTHERLAND
COMPUTERVISION
APPLICON
MAG1
CAM-I
SPERRY UNIVAC
MCAUTO

DASSAULT (FRANCE)

B-REP
CSG
B-REP
B-REP
B-REP
CSG
B-REP
B-REP
CSG
CELL DECOMP
B-REP
B-REP
CSG
CSG
CSG
B-REP
CSG

CNRS (FRANCE)
SDRC
SYNTHAVISION (MAG1)
CIS/CV (UK)
SHAPENDATA (UK)
SYNTHAVISION (MAG1)
HOKKAIDO U.
BAUSTEIN GEOMETRIC (T. U. BERLIN)
PADL-2 (U. ROCHESTER)

Geometric Modeling Systems


Input subsystem

Core representation subsystem

CSG
Based
CSG
Sweep
Based

Spatial
Decomp.
B-Rep.

B-Rep.
Based

Das könnte Ihnen auch gefallen