Linear Interpolation
How it Works

Linear Interpolation is a method that can be used for predicting. Very often something changes over a period of time: an object might change its position; a computer graphic image might change its shape; a population might increase. Linear interpolation allows you to predict an unknown value(position, shape, population, etc.) if you know any two particular values and assume that the rate of change is constant.

Linear interpolation assumes

  1. that you know two particular values.
  2. that the process is changing at a constant rate
  3. that you desire to find an unknown data point

As a warm up example, consider flying a plane from a point ten miles north of Providence at a rate of 200 miles per hours headed due north. How far from Providence will you be after one-half hour?

  1. We know the constant rate of change: 200 miles per hour in a northerly direction
  2. We know one point along the process: initially(time=0) we are 10 miles due north of Providence
  3. We want to find another point along the process, knowing the new time is one-half hour.

If you travel at 200 mph for one-half hour, you will have travelled 100 miles. You were initially 10 miles from Providence. Your final position will be:

10 miles + 100 miles = 110 miles due north of Providence.

To solve this problem generally, we would take the distance the plane flew and add it to 10 miles to get the plane's distance from Providence. The distance the plane flies is calculated using the distance formula, d = r * t, where d is the distance the plane will travel, r is the rate at which the plane flies(200 mph), and t is the time spent flying. Thus at any time, the distance from Providence will be:

Distance from Providence = 10 + 200 * t

We can easily predict the distance north of Providence that the plane will be at any time.

Let us now pose a similar problem that uses linear interpolation for its solution. Suppose you start at a point ten miles due north of Providence, and end 250 miles due north of Providence. Your flight direction is due north. How far from Providence will you be when when your flight time is 25% completed, assuming you travel at a constant rate of speed?

The total distance for the flight is

250 miles - 10 miles = 240 miles

If your speed and direction of flight are constant, then when your flight is completed you will have completed 25% of 240 miles, or

0.25 * 240 = 60 miles

We started ten miles north of Providence, so our final distance from the city will be

10 miles + 60 miles = 70 miles

Here we knew the initial and final positions of the plane, and were able to calculate an in-between position. This process of calculating unknown values from known values when we assume a constant rate of change is called linear interpolation.

Notice that there was no need to know the speed at which the plane was travelling. The assumption of constant speed was sufficient!

[A more formal approach to linear interpolation] |

[Home]