## Step 1: Problem Definition

 Our problem will be defined as follows: Noise in a room has been sampled in three locations at levels of 40, 10, and 5dB as noted in the figure. Each of the sample points has been assigned a unique color to aid in understanding the example. We wish to interpolate the dB intensity at the point located at the center of the "X" in the figure. Note that this algorithm applies to much more than just noise: we could just as easily be talking about heat disperison within a container, wind velocity over sections of a wing, or density at various depths and positions in the earth - it has many applications. Since all of our points are within the same plane, we can use a 2D microsphere to interpolate (if the points were in 3D we would use a 3D sphere, 4D etc.). For simplicity, the sphere (circle) has been divided into 16 segments. In a situation where accuracy was more important, the sphere would be given far more segments. To make sure that our final result will be in agreement with our intuition, we should form some kind of idea of what the expected value is. Ignoring the 40dB sample for a moment, we see that the interpolating location is half-way between 10dB and 5dB, suggesting that it would be approximately 7.5dB. Now, reintroducing the 40dB sample, we assume that the estimate of 7.5dB is probably a little smaller than the actual value because the influence of a strong 40dB will probably bring up our estimate. So, in all we would expect the interpolation to provide a result somewhere near 7.5, but definitely higher because of the 40 nearby. Step 2: Determining Values for Sphere Segments Looking at the figure to the right, for simplicity's sake, the sphere segments have been 'unrolled' starting with θ = 0 at the top, and working our way around towards θ = 2π (360 degrees). Compare the color values in the picture to the right to the colors of the circle from Step 1 if you still don't understand. Ok, so the KEY thing to remember about assigning these values is that ONLY the sample point with the LARGEST value will be represented in that section of the sphere. Note that there are no red-greens or blue-reds, or blue-greens. Either a section is red, green, or blue. No mixing. Only the largest value dominates the section. The values shown in this figure are calculated by: cos(θ) / dist2. For example, the sections of the sphere nearly exactly facing the red sample point have angles nearly 0, thus their values [cos(~0)/12] are nearly 1 (0.98). Similarly, the sections nearly facing the green sample point are nearly 0.25. The "2" in dist2 is arbitrary. A value ≥ 2 Provides differentiability, but in reality any positive number will suffice, and any value ≥ 1 will provide a good interpolation. I personally use p=2 and sometimes p=1 if differentiability is not required.

## Step 3: Determining Weights

Now that the tough work is out of the way, we simply have to determine the weights to assign to the original sample points.

To do this, we first accumulate and then normalize. The weights are accumulated from all the sections of the sphere (as seen in the figure to the left). The accumulation is performed by a simple summation. Then to make the weights add up to '1', we divide each weight by the total. The result is shown in the figure on the right.

 Simple Summation (before normalizing) Normalized Weights ## Step 4: Applying Original Values If we look back up to Step 1 we can see our original values for "red", "green", and "blue". Our final step involves applying those known values to the weight distribution we have created for them. As you can see, the final resultant value from all of this is 8.8dB which completely agrees with our original intuitive guess of "somewhere near 7.5, but definitely higher because of the 40 nearby." Congratulations, You have just completed the walkthrough! If you still have questions, please feel free to browse the other materials or email me.