Professional Documents
Culture Documents
Fill Polygon
Fill Polygon
Scan Conversion
Last step in the graphics pipeline
Efficiency is a central issue
Common primitives
Lines (done last class)
Polygons (fill polygons, today)
Circles
Hardware implementations
preferable
Filling Polygons:
Scan Line Algorithm
14
12
10
8
6
4
2
0
0
10
12
14
Filling Polygons:
Special Cases
14
12
10
ymax xmin
1
slope
4
2
0
0
10
12
14
12
10
11
10
7
6
0
0
10
12
14
0
13
Scan Line
AB
3
6/4
FA
12
CD
12
DE
-5/2
EF
-5/2
BC
5
6/4
AET
AET at scanline y=8
AET at Scanline y =9
Fill in desired pixels on scan line using even-odd parity from AET
Requested by:
glShadeModel(GL_SMOOTH);
Lighting calculations will be done at each vertex
using the material properties, and the vectors v and l
calculated for that vertex.
Bilinear interpolation is used to determine color
values in the interior of the polygon.
Bilinear Interpolation
CA
Cq
Cp
CB
Cp = ?
Cq= ?
Ck = ?