x))-imageAt(I,y+floor(dy),x+floor(dx)));
        i2 = imageAt(I,y+ceil(dy),x+floor(dx)) + (dx-floor(dx))*(imageAt(I,y+ceil(dy),x+ceil(dx))-imageAt(I,y+ceil(dy),x+floor(dx)));
        I2(y,x) = i1 + (dy-floor(dy))*(i2-i1);
    end
end
end

function i = imageAt(I,y,x)
[w,h] = size(I);
if (x <= 0 || y <= 0)
    i = 0;
    return;
end
if (x > w || y > h)
    i = 0;
    return;
end
i = I(y,x);
end
##### SOURCE END #####
--></body></html>