[ii, jj] = meshgrid(-5:5,-5:5);
dIdidi = 2;
dIdjdj = 2;
dIdidj = -2;
I = ii.*ii/2*dIdidi + jj.*jj/2*dIdjdj + ii.*jj*dIdidj;
imshow(I/max(I(:))*5)
dIdidj = 0;
I = ii.*ii/2*dIdidi + jj.*jj/2*dIdjdj + ii.*jj*dIdidj;
figure(2)
imshow(I/max(I(:))*5)
figure(3)
dIdidj = -2;
I = ii.*ii/2*dIdidi + jj.*jj/2*dIdjdj + ii.*jj*dIdidj;
mesh(ii,jj,I);
figure(4)
dIdidj = 0;
I = ii.*ii/2*dIdidi + jj.*jj/2*dIdjdj + ii.*jj*dIdidj;
mesh(ii,jj,I);