el_size);
    if(in_pixels_i < 0) 
        return pixel_in(x, 0);
    if(in_pixels_j >= pixels[0].length)
        return pixel_in((pixels[0].length-1) * pixel_size, y);
    if(in_pixels_j < 0)
        return pixel_in(0, y);
    return pixels[in_pixels_i][in_pixels_j];
}


var nd = 2.5;
var weight = 4;
var shiftd = 1.5;

function len(x, y) {
    return Math.sqrt(x*x + y*y);
}

function weight_of_point(x, y, xj, yi) {
    return Math.pow(2 * Math.pow(0.5, weight), 0.5)
        / (Math.pow(Math.abs(x - xj), we