For the Graphics Course final project, I have implemented the display of curvature on surfaces. By curvature we mean, Gaussian and Mean curvatures, i.e. the product and mean of principal curvatures k1, k2.
First, we obtained a 3D scan of (my) face and fitted a bicubic B-Spline surface with a 15×15 control point mesh. This is done manually using a tool written in OpenGL, to select each such control point and move it in 3D, so that the resultant surface matches with the scanned point cloud.

Since, tangents and normals can be easily computed on bezier patches using the control vector differences, we convert this B-Spline mesh into a Bezier mesh representing the same surface. The conversion scheme is discussed in Sec.11.2.8 ( Foley).
The figure below illustrates the B-Spline Mesh in blue and Bezier mesh in red.

Now, in order to improve display resolution, we can subdivide Bezier mesh using simple (mid-point) rules, again, illustrated in Foley (Sec-11.2.7). When ever a control point (in the initial mesh) is moved by the user, we have to subdivide the Bezier mesh upto the current level. We can implement this efficiently by pre-computing weights to create subdivided mesh points at any level, from the initial (small ) control mesh. Below is an illustration of subdivided Bezier mesh.

We then compute curvatures at each mesh point. It involves computing first and second Fundamental forms using first and second derivates and normals. For numerically stable derivatives, we used central differencing. A texture, created from curvatures at the grid points, is mapped onto the surface. (It can be done using a single call to gluNurbsCurve)

In the above figure, Gaussian curvature (product of principals) is plotted on the surface. Red color denotes positive values and green corresponds to negative values. We can notice that at valleys and peaks (like nose tip), both the principal curves are either concave or convex resulting in positive (RED) values. How ever, at saddle points (like bridge of the nose) the surface is concave in one (principal) direction and convex in the other, resulting in negative surface curvature.

This is the Mean curvature plot. Note that in valley regions, we have only +ve values since both principal curves are concave.