Lecture 5: Texture Mapping (54)
wangcynthia

I'm a little confused about this equation. I understand it's some weighted sum of two points, but what exactly does this equation mean? Also (might have missed this from earlier) but what exactly are v_0 and v_1?

chenwnicole

If I'm correct, then I think lerp(x, v_0, v_1) here is just defining the equation. If you go to the next few slides, you'll see lerp(s, u_00, u_01), etc. so this is just an equation that we're later going to plug points into.

irisli

This is how to derive the lerp as presented on the slides. It's just simple algebra that got too simplified.

let x = weight towards x_1 // between 0.0 and 1.0
lerp(x, v_0, v_1) =>
= x*v_1 + (1-x)*v_0 // weighted sum
= x*v_1 + v_0 - x*v_0 // distribute (1-x)
= x*(v_1 - v_0) + v_0 // associate x*
= v_0 + x*(v_1 - v_0) // rewrite
mkeshavarzi

As mentioned in lecture, v_0 and v_1 indicate two colors extracted from the texture map

You must be enrolled in the course to comment