int[] interpolate()
		{
			int[] interpPixel = new int[4];
			
			if (nailed)
			{
				interpPixel[RED] = (int)colors[bullseye * 4 + RED];
				interpPixel[GREEN] = (int)colors[bullseye * 4 + GREEN];
				interpPixel[BLUE] = (int)colors[bullseye * 4 + BLUE];
				interpPixel[ALPHA] = (int)colors[bullseye * 4 + ALPHA];
				return interpPixel;
			}
				
			/*
			 *  Uses weighted average, where weight is inversely 
			 * proportional to distance.
			 */ 
			double count = 0;
			double weight = 0;
			double largest = 0;
			
			double redSum = 0;
			double greenSum = 0;
			double blueSum = 0;
			double alphaSum = 0;


			for (int i = 0; i < 3; i++)
			{
				// interpolation for colors: only visible pixels
				if (colors[i * 4 + ALPHA] > 0)
				{
					largest = (distances[i] > largest) ? distances[i]:largest;
				}
			}
			
			for (int i = 0; i < 3; i++)
			{	
				if (colors[i * 4 + ALPHA] > 0)
				{					
					weight = largest / Math.sqrt(distances[i]);
					
					redSum += colors[i * 4 + RED] * weight;
					greenSum += colors[i * 4 + GREEN] * weight;
					blueSum += colors[i * 4 + BLUE] * weight;
					
					count += weight;
				}
			}
			interpPixel[RED] = (int)(redSum / count);
			interpPixel[GREEN] = (int)(greenSum / count);
			interpPixel[BLUE] = (int)(blueSum / count);
			
			// interpolation for alpha, use all
			count = 0;
			for (int i = 0; i < 3; i++)
			{
				largest = (distances[i] > largest) ? distances[i]:largest;
			}
			
			for (int i = 0; i < 3; i++)
			{
				weight = largest / distances[i];
				alphaSum += colors[i * 4 + ALPHA] * weight;
				count += weight;
			}
			interpPixel[ALPHA] = (int)(alphaSum / count);

			return interpPixel;
				
		}