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

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

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

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

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

torov[a_, b_][u_,v_] :={Cos[u]*(a+Cos[v]), Sin[u]*(b+Cos[v]), Sin[v]}

vn[x_][u_,v_] := Module[{xu, xv, N1},
xu=D[x[uu,vv], uu];
xv=D[x[uu,vv], vv];
N1=Cross[xu,xv];
Return[Simplify[(N1.N1)^(-1/2)*N1] /. {uu -> u, vv -> v}];];

Manipulate[GraphicsRow[{Graphics[{{Red,PointSize[.04], Point[{h,k}]}, Arrow[{{-1,0}, {1,0}}],Arrow[{{0,-1}, {0,1}}]} , PlotRange -> 1.3], Show[{ParametricPlot3D[sds[u,v], {u,-1,1}, {v,-1,1}, PlotStyle->Opacity[0.5]], Graphics3D[{Red,PointSize[.04], Point[sds[h,k]]}]}], Graphics3D[{Arrow[{{-1,0,0},{1,0,0}}], Arrow[{{0,-1,0},{0,1,0}}],Arrow[{{0,0,-1},{0,0,1}}],{Red, Thick,Arrow[{{0,0,0},vn[sds][h,k]}]}}, PlotRange -> 1.3]}],{h,-1,1}, {k,-1,1}]

Show[{ParametricPlot3D[sds[u,v], {u,-1,1}, {v,-1,1}, PlotStyle->Opacity[0.5]],ParametricPlot3D[sds[u,v] /. u -> v^2, {v, -1,1}, PlotStyle -> {Red, Thick}]}]

(* prima forma fondamentale *)

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}

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

pff[(*superficie scelta *)][u,v] //MatrixForm

pff[sfera[1]][u,v]//MatrixForm

catenoide[u_,v_]:={Cosh[v]*Cos[u],Cosh[v]*Sin[u],v}

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

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

ParametricPlot3D[enneper[u,v], {u,-2,2}, {v, -2,2},PlotRange -> 10]

Show[{ParametricPlot3D[catenoide[u,v], {u, 0, 2Pi}, {v, -1.5,1.5}, PlotStyle -> Opacity[.5]], ParametricPlot3D[iper1fa[1,1,1][u,v], {u, 0,2Pi}, {v, -2Pi,2Pi}, PlotStyle -> Directive[Orange]]}]

eee[x_][u_, v_] :=Simplify[Det[{D[x[uu,vv], uu,uu],D[x[uu,vv],uu], D[x[uu,vv],vv]}]/Sqrt[Det[pff[x][uu,vv]]]]/.{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[Det[pff[x][uu,vv]]]]/.{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[Det[pff[x][uu,vv]]]]/.{uu->u,vv->v}

sff[x_][u_,v_]:={{eee[x][uu,vv],fff[x][uu,vv]},{fff[x][uu,vv],ggg[x][uu,vv]}}/.{uu->u,vv->v}

cgauss[x_][u_,v_] := Simplify[Det[sff[x][uu,vv].Inverse[pff[x][uu,vv]]]]/.{uu -> u, vv-> v}

cmedia[x_][u_,v_] := Simplify[-Tr[sff[x][uu,vv].Inverse[pff[x][uu,vv]]]/2]/.{uu -> u, vv-> v}