Professional Documents
Culture Documents
03 Raster
03 Raster
Raster Graphics
Display Hardware
How are images display?
Raster Graphics Systems
How are imaging system organized?
Output Primitives
How can we describe shapes with primitives?
Color Models
How can we describe and represent colors?
Hard-Copy Devices
Ink-jet printer
Laser printer
Film recorder
Electrostatic printer
Pen plotter
cgvr.korea.ac.kr Graphics Lab @ Korea University
Cathode Ray Tube (CRT)
CGVR
Refresh Rate
Usually 30~75 Hz
255 150 75 0
255 255
150 150
75 750 0
255 255
150 150
75 750
255 150 750 0
255 255
150 150
75 750
255 150 750 0
255 255
150 150
75 750
255 150 750 0
255 255
150 150
75 750 Blue channel
0
255 150 75 0 Green channel
Red channel
Display Hardware
How are images display?
Raster Graphics Systems
How are imaging system organized?
Output Primitives
How can we describe shapes with primitives?
Color Models
How can we describe and represent colors?
Points
Lines
DDA Algorithm
Bresenham’s Algorithm
Polygons
Scan-Line Polygon Fill
Inside-Outside Tests
Boundary-Fill Algorithm
Antialiasing
y
setPixel (x, y)
Jaggies
= Aliasing
y2
y1
x1 x2
yk 1 yk m
Slope > 1 y2
Unit y interval = 1
y1
x1 x2
1
xk 1 xk
m
Slope > 1 y1
Unit y interval = 1
y2
-1 <= Slope < 0
Unit x interval = -1
x1 x2
yk 1 yk m
d <= 0 : choose E
1
d new F x p 2, y p : dnew= dold+a
2
cgvr.korea.ac.kr Graphics Lab @ Korea University
Bresenham’s Algorithm(cont.)
CGVR
Initial Value of d
1 1
F x0 1, y0 a x0 1 b y0 c
2 2
1
F x0 , y0 a b
2
F x, y 2 ax by c
d 2a b
Update d
x ,
x ,
if d 0, then y , if d 0, then
d 2 a b d 2 a
cgvr.korea.ac.kr Graphics Lab @ Korea University