4 - Triangle Scan Conversion
4 - Triangle Scan Conversion
Computation Stage
Computation
Model Output
Transformations Rasterization
Transformed
Model
Any object can be broken down
into polygons
Polygon Filling Algorithms
• A solid object
• Concave and Convex polygons
• Inside-Outside tests (odd-even rule)
• Bounding box
• Seed fill algorithms
– Boundary fill algorithm
– Flood fill algorithms
Polygon Tables
Triangle Area Filling Algorithms
• Why do we care about triangles?
• Edge Equations
• Edge Walking
Do something easier!
• Instead of polygons, TRIANGLES! Why?
– Edge Walking
Types of Triangles
• 2. Determine the
middle vertex
• 3. Walk down
edges from P0 P1
• 4. Compute
spans
P2
Edge Walking Pros and Cons
Pros Cons
• Fast • Special Cases
• Easy to implement in • Interpolation can be
hardware tricky
Edge Equations
P0
• A1x1+B1y1+C1=0
• A2x2+B2y2+C2=0
• A3x3+B3y3+C3=0
P1 P1
P2
P2