function H = Mcurv(k1,k2,k3,k4,k5,k6,k7,k8,k9,k10)
%  Finds the mean curvature of from a pre-computed bicubic approximations
%
%  H = Mcurv(k1,k2,k3,k4,k5,k6,k7,k8,k9,k10)

[m,n] = size(k1);
onemat = ones(m,n);
fr = k2;
fr2 = fr.*fr;
fc = k3;
fc2 = fc.*fc;
frr = k4;
frc = k5;
fcc = k6;

H = ((onemat+fc2).*frr + (onemat+fr2).*fcc - 2*fr.*fc.*frc)./  ...
    (2*sqrt(onemat+fr2+fc2).*sqrt(onemat+fr2+fc2).*sqrt(onemat+fr2+fc2));

