selladiscimmia[u_,v_]:={u,v,u^3-3u*v^2}

paraboloideiperbolico[u_,v_]:={u,v,u*v}

sfera[u_,v_]:={Cos[v]Cos[u],Cos[v]Sin[u],Sin[v]}

elicoide[a_,b_][u_,v_]:={a*v*Cos[u],a*v*Sin[u],b*u}

toretto[u_, v_]:={Cos[u] (2+Cos[v]),Sin[u] (3+Cos[v]),Sin[v]}

ellissoide[a_, b_, c_][u_, v_] := {a*Cos[u]Cos[v], b*Cos[u]Sin[v], c*Sin[u]}

eee[x_][u_,v_]:=Simplify[Det[{D[x[uu,vv],uu,uu],D[x[uu,vv],uu],D[x[uu,vv],vv]}]/Sqrt[Simplify[D[x[uu,vv],uu].D[x[uu,vv],uu]*D[x[uu,vv],vv].D[x[uu,vv],vv]-(D[x[uu,vv],uu].D[x[uu,vv],vv])^2]]] /. {uu->u,vv->v}

fff[x_][u_,v_]:=Simplify[Det[{D[x[uu,vv],uu,vv],D[x[uu,vv],uu],D[x[uu,vv],vv]}]/Sqrt[Simplify[D[x[uu,vv],uu].D[x[uu,vv],uu]*D[x[uu,vv],vv].D[x[uu,vv],vv]-(D[x[uu,vv],uu].D[x[uu,vv],vv])^2]]] /. {uu->u,vv->v}

ggg[x_][u_,v_]:=Simplify[Det[{D[x[uu,vv],vv,vv],D[x[uu,vv],uu],D[x[uu,vv],vv]}]/Sqrt[Simplify[D[x[uu,vv],uu].D[x[uu,vv],uu]*D[x[uu,vv],vv].D[x[uu,vv],vv]-(D[x[uu,vv],uu].D[x[uu,vv],vv])^2]]] /. {uu->u,vv->v}

ee[x_][u_,v_]:=Simplify[D[x[uu,vv],uu].D[x[uu,vv],uu]] /. {uu->u,vv->v}

ff[x_][u_,v_]:=Simplify[D[x[uu,vv],uu].D[x[uu,vv],vv]] /. {uu->u,vv->v}

gg[x_][u_,v_]:=Simplify[D[x[uu,vv],vv].D[x[uu,vv],vv]] /. {uu->u,vv->v}

curvaturadiGauss[x_][u_,v_]:=Simplify[(eee[x][u,v]*ggg[x][u,v]-fff[x][u,v]^2)/(ee[x][u,v]*gg[x][u,v]-ff[x][u,v]^2)]

curvaturamedia[x_][u_,v_]:=Simplify[(eee[x][u,v]*gg[x][u,v]-2fff[x][u,v]*ff[x][u,v]+ggg[x][u,v]*ee[x][u,v])/(2(ee[x][u,v]*gg[x][u,v]-ff[x][u,v]^2))]

curvaturadiGauss[elicoide[1,2]][u, v]

curvaturadiGauss[ellissoide[1,2,3]][u, v]

curvaturadiGauss[sfera][u, v]

curvaturadiGauss[paraboloideiperbolico][u, v]

curvaturadiGauss[toretto][u, v]

curvaturamedia[toretto][u,v]

Plot3D[curvaturadiGauss[ellissoide[1,2,2]][u, v], {u, -Pi/2, Pi/2}, {v, -Pi, Pi}]

Plot3D[curvaturamedia[ellissoide[1,1,2]][u, v], {u, -Pi/2, Pi/2}, {v, -Pi, Pi}]

Plot3D[curvaturadiGauss[elicoide[1,2]][u,v], {u, -Pi, Pi}, {v, -2, 2}]

GraphicsRow[{ParametricPlot3D[selladiscimmia[u,v],{u,-1,1},{v,-1,1},ColorFunction->Function[{x,y,z,u,v},Hue[curvaturadiGauss[selladiscimmia][u,v]]],ColorFunctionScaling->False], Plot3D[curvaturadiGauss[selladiscimmia][u,v],{u,-1,1},{v,-1,1}]}]

ParametricPlot3D[toretto[u,v],{u,-Pi,Pi},{v,-Pi,Pi},ColorFunction->Function[{x,y,z,u,v},Hue[curvaturamedia[toretto][u,v]]],ColorFunctionScaling->False]

Plot3D[curvaturadiGauss[toretto][u,v], {u,-Pi,Pi},{v,-Pi,Pi}]

GraphicsRow[{ParametricPlot3D[elicoide[3,2][u,v],{u,-Pi,Pi},{v,-1,1},ColorFunction->Function[{x,y,z,u,v},Hue[curvaturadiGauss[elicoide[3,2]][u,v]]],ColorFunctionScaling->False], Plot3D[curvaturadiGauss[elicoide[3,2]][u,v],{v,-Pi,Pi},{u,-1,1}]}]