function II = cisaillhor(I,a); 
    [m,n]=size(I); 
    if a>0 then
        N = n + ceil(a*(m-1)); II = zeros(m,N); 
        for k=1:N
            for j=1:m
                uu = k-1-a*(j-1); 
                if uu*(uu-(n-1))>0 then II(j,k)=0; 
                else
                    uinf=floor(uu)+1; usup=ceil(uu)+1;
                    Iaux1 = I(j,uinf); Iaux2 = I(j,usup); 
                    t = uu - floor(uu); 
                    II(j,k) = (1-t)*Iaux1 + t*Iaux2;   
                end 
            end
        end
    elseif a==0 II=I; 
    else
        N = n -ceil(a*(m-1)); II = zeros(m,N); 
        for k=1:N
            for j=1:m
                uu= k-1+ceil(a*(m-1))-a*(j-1); 
                if uu*(uu-(n-1))>0 then II(j,k)=0; 
                else
                    uinf=floor(uu)+1; usup=ceil(uu)+1; 
                    Iaux1 = I(j,uinf); Iaux2 = I(j,usup); 
                    t = uu - floor(uu); 
                    II(j,k) = (1-t)*Iaux1 + t*Iaux2;                     
                end
            end
        end         
    end
endfunction
