Lecture_Chapter3_b

# Linear interpolation component wise f rgb t f r t

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ter 3: Object Representation 29 What about colors? •  Linear interpolation (component-wise) f RGB (t) = (f R (t), f G (t), f B (t)) ECS 175 Chapter 3: Object Representation 30 What about colors? •  Linear interpolation across triangle •  Can we construct function as mixture of corner vertices? f ( α 0 , α1 , α2 ) = α 0 · f 0 + α 1 · f 1 + α 2 · f 2 ECS 175 Chapter 3: Object Representation 31 What about colors? •  Barycentric interpolation across triangle p = α 0 p 0 + α 1 p 1 + α 2 p2 f ( p) = α 0 f 0 + α 1 f 1 + α 2 f 2 Compute weights (barycentric coordinates) Interpolate values α0 + α1 + α2 = 1 0 ≤ α 0 , α1 , α2 ≤ 1 ECS 175 Chapter 3: Object Representation convex combination 32 What about colors? ECS 175 Chapter 3: Object Representation 33 What about colors? •  Polygon interpolation is dependent on triangulation ECS 175 Chapter 3: Object Representation 34 How about patterns? •  Define color on more positions than just vertices? •  Map an image onto a mesh – add details ECS 175 Chapter 3: Object Representation 35 Texture Mapping •  2D texture coordinates (s,t) specified per vertex •  Interpolation of coordinates takes care...
View Full Document

## This document was uploaded on 03/12/2014 for the course ECS 175 at UC Davis.

Ask a homework question - tutors are online