Trying to calculate principal curvatures of fourth order polynomial surface in x and y: what am I doing wrong

differential-geometry

I have a surface described by an equation of the form: $f(x,y,z) = c_1 x^4 + c_2 x^3y + c_3x^2y^2 +c_4xy^3+c_5y^4 + c_6x^3 +… c_{14}x + c_{15} -z$

I need principal curvatures at any point.
Based on my understanding that the shape operator $s = \nabla \textbf{N}$, I did the following:

I first calculated the equation of the normals to the surface by calculating the gradient of the right hand side, and then normalized it by the magnitude.

I then differentiated the resulting 3 x 1 vector with respect to x, y, and z to give a 3 x 3 matrix (should be the shape operator), all using MATLAB, and then calculated the eigenvectors and eigenvalues of the matrix.

However, when I plugged in the x,y,z coordinates on the surface, rather than getting the expected principal curvature directions (meridional and circumferential), I'm getting strange directions.

One example is attached – literally just lines pointing horizontally. There's a top view and a side-on view that looks somewhat mountain-shaped; both show the incorrectly oriented eigenvectors. The other principal curvature direction is literally just pointing upwards (like (0,0,1)), not shown here.

What am I doing wrong here?

Thank you

Side view
Top view

Best Answer

You have to differentiate $\textbf N$ with respect to tangent vectors to the surface, which the vectors in the $x$, $y$, and $z$ directions aren't if the surface is $f(x, y, z) = 0$.