interpolation

# interpolation - Notes on Bilinear and Trilinear...

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

Notes on Bilinear and Trilinear Interpolation 1 Linear Interpolation in 1D Let us consider first the simplest case of interpolation, namely linear interpolation in 1D. Assume we have 2 points x 0 and x 1 on some axis associated with two values f 0 and f 1 , respectively. We wish to determine the value at some other point x located between x 0 and x 1 using linear interpolation. The situation is illustrated in Figure 1. Figure 1: Linear interpolation in 1D between ( x 0 , f 0) and ( x 1 , f 1 ). To do so, we first compute the local coordinate u of x with respect to x 0 and x 1 , which is obtained as: u = x - x 0 x 1 - x 0 . The value f ( x ) at x can now be computed as f ( x ) = (1 - u ) f 0 + u f 1 (1) Note that Equation 1 can also be written in the (maybe?) more familiar form: f ( x ) - f 0 = u ( f 1 - f 0 ) = ( x - x 0 ) f 1 - f 0 x 1 - x 0 . This latter expression corresponds namely to the equation of a line through ( x 0 , f 0 ) with slope f 1 - f 0 x 1 - x 0 . Observe also that in the even simpler case where x 0 = 0 and x 1 = 1 (i.e. linear interpolation in the unit interval), u = x and the previous expression can be simplified as follows: f ( x ) - f 0 = x ( f 1 - f 0 ) . (2) 1

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

View Full Document
Figure 2: Bilinear interpolation in unit square. 2 Bilinear Interpolation in 2D We now consider the case of a unit square in the plane and associate a value which each of its 4 vertices (e.g, f (0 , 0) =: f 00 , f (1 , 0) =: f 10 , etc...). We want to interpolate these 4 values at a given position P = ( u, v ) located within the square. Refer to Figure 2. The basic idea behind bilinear interpolation is to break this interpolation problem into successive linear interpolation steps. If we look at Figure 2, we see that the position ( u, v ) is located on the vertical edge connecting ( u, 0) and ( u, 1), and its local coordinates with respect to these two points is v (refer to previous discussion about local coordinates). Additionally, ( u, 0) is located on the bottom edge connecting (0 , 0) and (1 , 0), with local coordinate u . If we apply Equation 2 on that edge, we can determine the value at ( u, 0) to be f ( u, 0) = f 00 + u ( f 10 - f 00 ) = (1 - u ) f 00 + u f 10 . (3) Applying the exact same reasoning to the position ( u, 1) located on the top edge connecting (0 , 1) to (1 , 1), we obtain: f ( u, 1) = f 01 + u ( f 11 - f 01 ) = (1 - u ) f 01 + u f 11 . (4) The final step consists in interpolating linearly along the edge ( u, 0) - ( u, 1), where the point ( u, v ) has local coordinate v . One gets: f ( u, v ) = f ( u, 0) + v ( f ( u, 1) - f ( u, 0)) = (1 - v ) f ( u, 0) + v f ( u, 1) . (5) We can now substitute the expressions of f ( u, 0) and f ( u,
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern