Lecture_Chapter3_b

# Lecture_Chapter3_b - Review of Tuesday We have learnt how...

This preview shows pages 1–9. Sign up to view the full content.

Review of Tuesday We have learnt how to rasterize lines and fill polygons Colors (and other attributes) are specified at vertices Interpolation required to fill polygon with attributes 26 ECS 175 Chapter 3: Object Representation

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Review of Tuesday Mathematical formulation: Given (“positions” and “values”) Find function defined on such that We required our solutions to be linear functions 27 ECS 175 Chapter 3: Object Representation ( x i ,f i ) f f ( x i )= f i [ x 0 ,x n ]
Interpolation: Linear Linear interpolation 28 ECS 175 Chapter 3: Object Representation Parametric function takes the form Values between u 0 and u 1 are “ mixtures ” of f 0 and f 1 f ( u )=(1 u ) f 0 + uf 1 u =0 . 2 80% f 0 + 20% f 1 Control points are weighted/blended together

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Interpolation: Linear Basis functions/Blending functions/Weights 29 ECS 175 Chapter 3: Object Representation control point contributions are blended together partition of unity (1 u )+ u =1 f ( u )= i b i ( u ) · f i f ( u )=(1 u ) f 0 + uf 1 f ( u b 0 ( u ) · f 0 + b 1 ( u ) · f 1 weights sum up to one
What about colors? Linear interpolation (component-wise) 30 ECS 175 Chapter 3: Object Representation f RGB ( t )=( f R ( t ) ,f G ( t ) B ( t ))

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
What about colors? Linear interpolation across triangle Can we construct function as mixture of corner vertices? 31 ECS 175 Chapter 3: Object Representation f ( α 0 1 2 )= α 0 · f 0 + α 1 · f 1 + α 2 · f 2
What about colors? Barycentric interpolation across triangle 32 ECS 175 Chapter 3: Object Representation convex combination f ( p )= α 0 f 0 + α 1 f 1 + α 2 f 2 α 0 + α 1 + α 2 =1 0 α 0 1 2 1 Compute weights (barycentric coordinates ) Interpolate values p = α 0 p 0 + α 1 p 1 + α 2 p 2

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document