Function Repository Resource:

PrincipalCurvatures

Source Notebook

Compute the principal curvatures of a surface

Contributed by: Wolfram Staff (original content by Alfred Gray)

ResourceFunction["PrincipalCurvatures"][s,{u,v}]

computes the principal curvatures of the surface s with respect to variables u and v.

ResourceFunction["PrincipalCurvatures"][eq,{x,y,z}]

computes the principal curvatures of the surface given by the implicit equation eq in variables x,y and z.

Details

The principal curvatures κ1 and κ2 give the maximum and minimum of the normal curvature at a given point on a regular surface and measure the maximum and minimum bending of the surface for every point.
The product of the principal curvatures is known as the Gaussian curvature and the mean of the principal curvatures is known as the mean curvature.

Examples

Basic Examples (3) 

Define a torus:

In[1]:=
torus = Entity["Surface", "Torus"]["ParametricEquations"][b, a][u, v]
Out[1]=

Calculate the principal curvatures:

In[2]:=
ResourceFunction["PrincipalCurvatures"][torus, {u, v}] // PowerExpand // FullSimplify
Out[2]=

The principal curvatures for an implicit surface:

In[3]:=
ResourceFunction["PrincipalCurvatures"][f[x, y, z], {x, y, z}] // FullSimplify // TraditionalForm
Out[3]=

Define the implicit Cartesian equation for the ellipsoid:

The principal curvatures:

In[4]:=
FullSimplify[
 ResourceFunction["PrincipalCurvatures"][
  ellipsoidimplicit[a, b, c][x, y, z], {x, y, z}], a > b > c > 0]
Out[4]=
In[5]:=
ContourPlot3D[
 ellipsoidimplicit[1, 2, 3][x, y, z] == 0, {x, -2, 2}, {y, -2, 2}, {z, -3, 3}]
Out[5]=

Properties and Relations (5) 

Define a surface:

In[6]:=
ms = Entity["Surface", "MonkeySaddle"]["ParametricEquations"][1][u, v]
Out[6]=

Compute the Gaussian curvature and mean curvature:

In[7]:=
\[ScriptCapitalK] = ResourceFunction["GaussianCurvature"][ms, {u, v}] // FullSimplify
Out[7]=
In[8]:=
\[ScriptCapitalH] = ResourceFunction["MeanCurvature"][ms, {u, v}] // FullSimplify
Out[8]=
In[9]:=
\[ScriptCapitalH]^2 - \[ScriptCapitalK] // FullSimplify
Out[9]=

Principal curvatures are equal to :

In[10]:=
ResourceFunction["PrincipalCurvatures"][ms, {u, v}] // PowerExpand // FullSimplify
Out[10]=
In[11]:=
% /. {u -> 1., v -> 1.}
Out[11]=

The principal curvatures are equal to the eigenvalues of the Weingarten matrix:

In[12]:=
Eigenvalues[ResourceFunction["WeingartenMatrix"][ms, {u, v}]] // PowerExpand // FullSimplify
Out[12]=
In[13]:=
% /. {u -> 1., v -> 1.}
Out[13]=

If the principal curvatures have the same sign everywhere, that means there are only elliptic points on the surface:

In[14]:=
ResourceFunction["PrincipalCurvatures"][
  Entity["Surface", "Sphere"]["ParametricEquations"][1][u, v], {u, v}] // PowerExpand
Out[14]=

Principal curvatures with different signs mean that there are only hyperbolic points on the surface:

In[15]:=
FullSimplify[
 PowerExpand[
  ResourceFunction["PrincipalCurvatures"][
   Entity["Surface", "HyperbolicParaboloid"]["ParametricEquations"][1,
      1][u, v], {u, v}]]]
Out[15]=
In[16]:=
% /. {u -> 1., v -> 1.}
Out[16]=

When at least one principal curvature is equal to zero everywhere, there are only parabolic points on the surface:

In[17]:=
FullSimplify[
 PowerExpand[
  ResourceFunction[
   "PrincipalCurvatures"][{Cos[u], Sin[u] + v, v}, {u, v}]], {u, v} \[Element] Reals]
Out[17]=

When both are equal to zero, there are only planar points on the surface:

In[18]:=
ResourceFunction["PrincipalCurvatures"][{u, u + v, v}, {u, v}]
Out[18]=

Publisher

Enrique Zeleny

Version History

  • 1.1.0 – 05 August 2021
  • 1.0.0 – 17 April 2020

Source Metadata

Related Resources

License Information