Solution (source code)

= Solution

Evaluate all quantities at $(u_0,v_0)$ and assume a <regular surface> point, $S_u\times S_v\ne0$. The <tangent plane> passes through $S_0=S(u_0,v_0)$ and is spanned by $S_u,S_v$. Thus
$$
\boxed{x=S_0+\alpha S_u+\beta S_v,\qquad (S_u\times S_v)\cdot(x-S_0)=0.}
$$
Choose the <unit normal> $n=(S_u\times S_v)/\|S_u\times S_v\|$. The <first fundamental form> has coefficients
$$
E=S_u\cdot S_u,\qquad F=S_u\cdot S_v,\qquad G=S_v\cdot S_v,
$$
while the <second fundamental form> has coefficients
$$
e=n\cdot S_{uu},\qquad f=n\cdot S_{uv},\qquad g=n\cdot S_{vv}.
$$
To derive the <curvature> formula, differentiate $n\cdot S_u=n\cdot S_v=0$. This gives $-n_u\cdot S_u=e$, $-n_u\cdot S_v=f$, $-n_v\cdot S_u=f$ and $-n_v\cdot S_v=g$. Therefore the <shape operator> $-dn$, expressed in the tangent basis, is
$$
\begin{pmatrix}E&F\\F&G\end{pmatrix}^{-1}\begin{pmatrix}e&f\\f&g\end{pmatrix}.
$$
Its <eigenvalues> are the <principal curvatures>. Their product, the <Gaussian curvature>, is its <determinant>:
$$
\boxed{K=\frac{eg-f^2}{EG-F^2}.}
$$
Regularity ensures $EG-F^2=\|S_u\times S_v\|^2>0$. Reversing $n$ changes the signs of $e,f,g$ and both <principal curvatures> but leaves $K$ unchanged. At a singular parameter point this quotient and the cross-product <normal vector> are undefined; an alternative regular chart or separate geometric analysis is required.