gcurvature[astell[a_,a_,a_]][u_,v_]
(1024*Sec[v]^4)/
  (9*a^6*(-18 + 2*Cos[4*u] + Cos[4*u - 2*v] + 
       14*Cos[2*v] + Cos[4*u + 2*v])^2)

gcurvature[catalan][u_,v_]:=Sech[v/2]^4/(8*(Cos[u] - Cosh[v]))

mcurvature[catalan][u_,v_]:=0

gcurvature[catenoid[a_]][u_,v_]:=-(Sech[v/a]^4/a^2)

mcurvature[catenoid[a_]][u_,v_]:=0

gcurvature[crosscap][u_,v_]:=
(32*(2 + Cos[2*v])*Sin[v]^4)/((1 - u^2)*(-5 - 10*u^2 - Cos[2*v] +
15*u^2*Cos[2*v] - 4*Cos[4*v] -  6*u^2*Cos[4*v] + u^2*Cos[6*v])^2)

mcurvature[crosscap][u_,v_]:=
((-17 - 19*u^2 + 8*Cos[2*v] - 8*u^2*Cos[2*v] -
7*Cos[4*v] + 27*u^2*Cos[4*v] + 4*Cos[6*v])*Sin[v])/(2^(1/2)*
(-1 + u^2)*(5 + 10*u^2 + Cos[2*v] - 15*u^2*Cos[2*v] + 4*Cos[4*v] +
6*u^2*Cos[4*v] - u^2*Cos[6*v])^(3/2))

gcurvature[dini[a_,b_]][u_,v_]:=-(a^2 + b^2)^(-1)

mcurvature[dini[a_,b_]][u_,v_]:=-Cot[2v]/(a^2 + b^2)^(1/2)

k1[dini[a_,b_]][u_,v_]:=Sin[v]^2/(Sin[2v](a^2 + b^2)^(1/2))

k2[dini[a_,b_]][u_,v_]:=-Cos[v]^2/(Sin[2v](a^2 + b^2)^(1/2))

gcurvature[eightsurface][u_,v_]:=
4*(2 + Cos[2*v]))/(5 + Cos[2*v] + 4*Cos[4*v])^2

mcurvature[eightsurface][u_,v_]:=
(2^(3/2)*Cos[v]^3*(-11 + 3*Cos[2*v]
- 2*Cos[4*v])*Csc[2*v]^3*Sin[v]^2)/(5 + Cos[2*v] + 4*Cos[4*v])^(3/2)

gcurvature[ellipticalhyperboloidplus[a_, b_, c_]][u_,v_]:=
-((a^2*b^2*c^2)/(-(a^2*Sin[u]*(v*Cos[u] +
Sin[u]) + Cos[u]*b^2*(Cos[u] - v*Sin[u]))^2 +
 (Cos[u]^2*b^2 + c^2 + a^2*Sin[u]^2)*(a^2*(v*Cos[u] +
 Sin[u])^2 + b^2*(Cos[u] - v*Sin[u])^2))^2)

mcurvature[ellipticalhyperboloidplus[a_, b_, c_]][u_,v_]:=
(-((1 + v^2)*a*b*c*(Cos[u]^2*b^2 + c^2 + a^2*Sin[u]^2)) +
2*a*b*c*(a^2*Sin[u]*(v*Cos[u] + Sin[u]) + Cos[u]*b^2*(Cos[u] -
v*Sin[u])))/(2*(-(a^2*Sin[u]*(v*Cos[u] + Sin[u]) +
Cos[u]*b^2*(Cos[u] - v*Sin[u]))^2 +
(Cos[u]^2*b^2 + c^2 + a^2*Sin[u]^2)*
(a^2*(v*Cos[u] + Sin[u])^2 + b^2*(Cos[u] - v*Sin[u])^2))^(3/2))

gcurvature[ellipsoid[a_, b_, c_]][u_,v_]:=
(Cos[v]^4*a^2*b^2*c^2)/((Cos[u]^2*Cos[v]^2*b^2 +
Cos[v]^2*a^2*Sin[u]^2)*(Cos[v]^2*c^2 + Cos[u]^2*a^2*Sin[v]^2 +
b^2*Sin[u]^2*Sin[v]^2) - ((a^2 - b^2)^2*Sin[2*u]^2*Sin[2*v]^2)/16)^2

mcurvature[ellipsoid[a_, b_, c_]][u_,v_]:=
(-(Cos[v]*a*b*c*(Cos[u]^2*Cos[v]^2*b^2 + Cos[v]^2*a^2*Sin[u]^2))
- Cos[v]^3*a*b*c*(Cos[v]^2*c^2 + Cos[u]^2*a^2*Sin[v]^2 +
b^2*Sin[u]^2*Sin[v]^2))/(2*((Cos[u]^2*Cos[v]^2*b^2 +
Cos[v]^2*a^2*Sin[u]^2)*(Cos[v]^2*c^2 + Cos[u]^2*a^2*Sin[v]^2 +
b^2*Sin[u]^2*Sin[v]^2) - ((a^2 - b^2)^2*Sin[2*u]^2*
Sin[2*v]^2)/16)^(3/2))

gcurvature[enneper][u_,v_]:=-4/(1 + u^2 + v^2)^4

mcurvature[enneper][u_,v_]:=0

(*
alpha[t_]:={phi[t],psi[t]}
alpha'[t_]:={phi'[t],psi'[t]}
alpha''[t_]:={phi''[t],psi''[t]}
*)

gcurvature[genhel[alpha_][sl_]][u_,v_]:=
(-(sl^2 phi'[v]^4)+phi[v]^3 psi'[v]
(-(psi'[v] phi''[v])+phi'[v] psi''[v]))/ 
(sl^2 phi'[v]^2+ phi[v]^2 phi'[v]^2+ phi[v]^2psi'[v]^2)

mcurvature[genhel[alpha_][sl_]][u_,v_]:=
(-2 sl^2 phi'[v]^2 psi'[v] -
phi[v]^2psi'[v] (phi'[v]^2+ psi'[v]^2) +
phi[v] (sl^2+ phi[v]^2)
(psi'[v] phi''[v] - phi'[v] psi''[v]))/
(2 (sl^2 phi'[v]^2 + phi[v]^2 phi'[v]^2 + phi[v]^2 psi'[v]^2)^(3/2))

gcurvature[handkerchief[a_]][u_,v_]:=
(4*(u^2 - v^2 - a^2))/(1 + u^4 + 6*u^2*v^2 +
v^4 + 4*u^3*a - 4*u*v^2*a + 4*u^2*a^2 + 4*v^2*a^2)^2

mcurvature[handkerchief[a_]][u_,v_]:=(2*u + u^5 + 2*u^3*v^2
- 3*u*v^4 + 3*u^4*a - 6*u^2*v^2*a + 3*v^4*a
- 4*u^2*a^3 + 4*v^2*a^3)/(1 + u^4 + 6*u^2*v^2 +
v^4 + 4*u^3*a - 4*u*v^2*a + 4*u^2*a^2 + 4*v^2*a^2)^(3/2)

gcurvature[helicoid[a_, b_, c_]][u_,v_]:=
-((a^2*b^2*c^2)/((v^2*Cos[u]^2*b^2 + c^2 +
v^2*a^2*Sin[u]^2)*(Cos[u]^2*a^2 + b^2*Sin[u]^2) -
(v^2*(a^2 - b^2)^2*Sin[2*u]^2)/4)^2)

mcurvature[helicoid[a_, b_, c_]][u_,v_]:=
-(v*a*b*(-a^2 + b^2)*c*Sin[2*u])/(2*((v^2*Cos[u]^2*b^2 +
c^2 + v^2*a^2*Sin[u]^2)*(Cos[u]^2*a^2 + b^2*Sin[u]^2) -
(v^2*(a^2 - b^2)^2*Sin[2*u]^2)/4)^(3/2))

gcurvature[heltocat[c_]][u_,v_]:=-Sech[v]^4

mcurvature[heltocat[c_]][u_,v_]:=0

gcurvature[henneberg][u_,v_]:=Sech[u]^4/(8*(Cos[4*v] - Cosh[4*u]))

mcurvature[henneberg][u_,v_]:=0

gcurvature[hyperbolicparaboloid][u_,v_]:=
-(1 + u^2 + v^2)^(-2)

mcurvature[hyperbolicparaboloid][u_,v_]:=
-((u*v)/(1 + u^2 + v^2)^(3/2))
gcurvature[moebiusstrip[a_]][u_,v_]:=
-4/((4 + 3*v^2 + 8*v*Cos[u/2] + 2*v^2*Cos[u])^2*a^2)

mcurvature[moebiusstrip[a_]][u_,v_]:=
(-2*(2 + 2*v^2 + 4*v*Cos[u/2] + v^2*Cos[u])*Sin[u/2])/
((4 + 3*v^2 + 8*v*Cos[u/2] + 2*v^2*Cos[u])^(3/2)*a)

gcurvature[monkeysaddle][u_,v_]:=
        (-36*(u^2 + v^2))/(1 + 9*u^4 + 18*u^2*v^2 + 9*v^4)^2

mcurvature[monkeysaddle][u_,v_]:=
       (27*u*(-u^4 + 2*u^2*v^2 + 3*v^4))/
        (1 + 9*u^4 + 18*u^2*v^2 + 9*v^4)^(3/2)

gcurvature[paraboloid[a_, b_, c_]][u_,v_]:=
(4*a*b - c^2)/(1 + 4*u^2*a^2 + 4*v^2*b^2 + 4*u*v*a*c +
4*u*v*b*c + u^2*c^2 + v^2*c^2)^2

mcurvature[paraboloid[a_, b_, c_]][u_,v_]:=
(-2*c*(2*v*b + u*c)*(2*u*a + v*c) + 2*a*(1 + (2*v*b + u*c)^2) +
2*b*(1 + (2*u*a + v*c)^2))/(2*(1 + 4*u^2*a^2 + 4*v^2*b^2 +
4*u*v*a*c + 4*u*v*b*c + u^2*c^2 + v^2*c^2)^(3/2))

gcurvature[plucker][u_,v_]:=-(((-u^2 + v^2)^2*(u^2 + v^2)^2)/
    (u^4 + u^6 - 2*u^2*v^2 + 3*u^4*v^2 + v^4 + 
       3*u^2*v^4 + v^6)^2)

mcurvature[plucker][u_,v_]:=(-2*u*v)/((u^2 + v^2)^2*
    ((u^4 + u^6 - 2*u^2*v^2 + 3*u^4*v^2 + v^4 + 
         3*u^2*v^4 + v^6)/(u^2 + v^2)^3)^(3/2))

k1[plucker][u_,v_]:=(-2*u*v*(u^2 + v^2)^(5/2))/
   (u^4 + u^6 - 2*u^2*v^2 + 3*u^4*v^2 + v^4 + 
      3*u^2*v^4 + v^6)^(3/2) + 
  ((u^2 + v^2)*(u^8 + u^10 - 4*u^6*v^2 + 5*u^8*v^2 + 
        6*u^4*v^4 + 10*u^6*v^4 - 4*u^2*v^6 + 10*u^4*v^6 + 
        v^8 + 5*u^2*v^8 + v^10)^(1/2))/
   (u^4 + u^6 - 2*u^2*v^2 + 3*u^4*v^2 + v^4 + 3*u^2*v^4 + 
      v^6)^(3/2)

k2[plucker][u_,v_]:=(-2*u*v*(u^2 + v^2)^(5/2))/
   (u^4 + u^6 - 2*u^2*v^2 + 3*u^4*v^2 + v^4 + 
      3*u^2*v^4 + v^6)^(3/2) - 
  ((u^2 + v^2)*(-u^8 - u^10 + 4*u^6*v^2 + 3*u^8*v^2 - 
        6*u^4*v^4 + 14*u^6*v^4 + 4*u^2*v^6 + 14*u^4*v^6 - 
        v^8 + 3*u^2*v^8 - v^10)^(1/2))/
   (u^4 + u^6 - 2*u^2*v^2 + 3*u^4*v^2 + v^4 + 3*u^2*v^4 + 
      v^6)^(3/2)

gcurvature[pseudosphere[a_]][u_,v_]:=-a^(-2)

mcurvature[pseudosphere[a_]][u_,v_]:=-Cot[2*v]/a

kmu[pseudosphere[a_]][u_,v_]:=Tan[v]/a

kpi[pseudosphere[a_]][u_,v_]:=-Cot[v]/a

(*
gcurvature[cnchysurfrev[a_,b_]][u_,v_]:=-a^(-2)

kpi[pseudosphere[a_]][u_,v_]:=
-(Sech[v/a]*(4*a^2 + 2*b^2 - b^2*Sinh[v/a]^2)^(1/2))/
  (2*a*b)

kpi[pseudosphere[a_]][u_,v_]:=
-(Sech[v/a]*(4*a^2 + 2*b^2 - b^2*Sinh[v/a]^2)^(1/2))/
  (2*a*b)

*) 

gcurvature[roman[a_]][u_,v_]:=
   (1024*(2*a^12*Cos[2*v]^2*(5 - 3*Cos[4*v])*Sin[2*u]^2 - 
      16*a^12*Cos[2*u]^2*Sin[2*v]^2))/
  (a^16*(46 + 18*Cos[4*u] + 3*Cos[4*(u - 2*v)] - 
       20*Cos[4*(u - v)] - 24*Cos[4*v] - 6*Cos[8*v] - 
       20*Cos[4*(u + v)] + 3*Cos[4*(u + 2*v)])^2)

mcurvature[roman[a_]][u_,v_]:=(2^(1/2)*Cos[2*v]*(682*Sin[2*u] + 82*Sin[6*u] + 
      3*Sin[6*u - 8*v] + 39*Sin[2*(u - 4*v)] - 
      228*Sin[2*u - 4*v] - 52*Sin[6*u - 4*v] + 
      39*Sin[2*(u + 4*v)] - 228*Sin[2*u + 4*v] - 
      52*Sin[6*u + 4*v] + 3*Sin[6*u + 8*v]))/
   (a^2*(46 + 18*Cos[4*u] + 3*Cos[4*(u - 2*v)] - 
       20*Cos[4*(u - v)] - 24*Cos[4*v] - 6*Cos[8*v] - 
       20*Cos[4*(u + v)] + 3*Cos[4*(u + 2*v)])^(3/2))

gcurvature[sphere[a_]][u_,v_]:=a^(-2)

mcurvature[sphere[a_]][u_,v_]:=-a^(-1)

kmu[sphere[a_]][u_,v_]:=-a^(-1)

kpi[sphere[a_]][u_,v_]:=-a^(-1)

kmu[sphere[a_]][u_,v_]:=-a^(-1)

kpi[sphere[a_]][u_,v_]:=-a^(-1)

gcurvature[cpcsurfrev[a_,b_][u_,v_]:=-a^(-2)

mcurvature[cpcsurfrev[a_,b_][u_,v_]:=

mcurvature[cpcsurfrev[a_,b_][u_,v_]:=
(-(b^2*Cos[v/a]^2) - a^2 + b^2*Sin[v/a]^2)/
  (a*b*Cos[v/a]*(a^2 - b^2*Sin[v/a]^2)^(1/2))

kpi[cpcsurfrev[a_,b_][u_,v_]:=
-(a^2 - b^2*Sin[v/a]^2)^(1/2)/(a*b*Cos[v/a])

kpi[cpcsurfrev[a_,b_][u_,v_]:=
-b*Cos[v/a]/(a*(a^2 - b^2*Sin[v/a]^2)^(1/2))

(*
alpha[t_]:={phi[t],psi[t]}
alpha'[t_]:={phi'[t],psi'[t]}
alpha''[t_]:={phi''[t],psi''[t]}
*)

gcurvature[surfrev[alpha_]][u_,v_]:=
alpha'[v][[2]] (-(alpha'[v][[2]] alpha''[v][[1]]) +
alpha'[v][[1]] alpha''[v][[2]])/
alpha[v][[1]] (alpha'[v][[1]]^2  + alpha'[v][[2]]^2)^2

mcurvature[surfrev[alpha_]][u_,v_]:=
(alpha[v][[1]]^2(-(alpha'[v][[1]]^2  alpha'[v][[2]]) -
alpha'[v][[2]]^2 + alpha[v][[1]] alpha'[v][[2]] alpha''[v][[1]] - 
alpha[v][[1]] alpha'[v][[1]] alpha''[v][[2]]))/
(2 (alpha[v][[1]]^2(alpha'[v][[1]]^2+ alpha'[v][[2]]^2))^(3/2))
gcurvature[torus[a_, b_, c_]][u_,v_]:=
(4*Cos[v]*b*c^2)/((a + Cos[v]*b)*(b^2 - Cos[2*v]*b^2 +
c^2 + Cos[2*v]*c^2)^2)

mcurvature[torus[a_,b_,c_]][u_,v_]:=
(c*(-4*a*b - 5*Cos[v]*b^2 + Cos[3*v]*b^2 - 3*Cos[v]*c^2 -
Cos[3*v]*c^2))/(2^(3/2)*(a + Cos[v]*b)*(b^2 - Cos[2*v]*b^2 +
c^2 + Cos[2*v]*c^2)^(3/2))

(*
gcurvature[twiflat[pm_, a_, c_][sl_]][u_,v_]:=
(c^6 - c^4*sl^2 - 2*a^2*c^4*v^2 + 2*a^2*c^2*sl^2*v^2 + 2*a^4*c^2*pm*v^4 - 
    a^4*c^2*pm^2*v^4 - a^4*sl^2*v^4)/
  (c^4 - c^2*sl^2 - c^2*v^2 - 2*a^2*c^2*pm*v^2 + a^2*sl^2*v^2 + a^2*v^4 + 
     a^4*pm^2*v^4)^2

mcurvature[twiflat[pm_, a_, c_][sl_]][u_,v_]:=
((-c^2 + a^2*v^2)^(1/2)*(c^6 - c^4*sl^2 - 3*a^2*c^4*pm*v^2 + 
      3*a^2*c^2*pm*sl^2*v^2 - a^2*c^2*v^4 + 2*a^2*c^2*pm*v^4 + 
      3*a^4*c^2*pm^2*v^4 - 2*a^4*pm*sl^2*v^4 - a^4*pm*v^6 - a^6*pm^3*v^6))/
  (2*v*(c^4 - c^2*sl^2 - c^2*v^2 - 2*a^2*c^2*pm*v^2 + a^2*sl^2*v^2 + 
      a^2*v^4 + a^4*pm^2*v^4)*(-c^6 + c^4*sl^2 + c^4*v^2 + a^2*c^4*v^2 + 
       2*a^2*c^4*pm*v^2 - 2*a^2*c^2*sl^2*v^2 - 2*a^2*c^2*v^4 - 
       2*a^4*c^2*pm*v^4 - a^4*c^2*pm^2*v^4 + a^4*sl^2*v^4 + a^4*v^6 + 
       a^6*pm^2*v^6)^(1/2))

Simplify[mcurvature[twiflat[pm,a,c][c]][u, v] /. pm->1]//PowerExpand

a^2/(2*(1 + a^2)^(1/2)*(-c^2 + a^2*v^2)^(1/2))
*)

(*
"gcurvature[twiflat[pm,a,c][c]][u, v]//Simplify"
-((a^4*c^2*(-1 + pm)^2)/
    (-c^2 + a^2*c^2 - 2*a^2*c^2*pm + a^2*v^2 + a^4*pm^2*v^2)^2)
*)

gcurvature[twisphere[a_, b_]][u_,v_]:=
(a^2*Cos[v]^4 - b^2*Sin[v]^4)/(a^2*Cos[v]^2 + b^2*Sin[v]^2)^2

mcurvature[twisphere[a_, b_]][u_,v_]:=
-(Cos[v]*(b^2 + 2*a^2*Cos[v]^2 + 2*b^2*Sin[v]^2))/
  (2*(a^2*Cos[v]^2 + b^2*Sin[v]^2)^(3/2))


gcurvature[whitneyumbrella][u_,v_]:=
(-4*v^2)/(u^2 + 4*v^2 + 4*v^4)^2

mcurvature[whitneyumbrella][u_,v_]:=
-((u*(1 + 3*v^2))/(u^2 + 4*v^2 + 4*v^4)^(3/2))
