Function Repository Resource:

WeingartenMatrix

Source Notebook

Compute the Weingarten matrix of a surface

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

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

is the matrix of the shape operator of surface s with respect to variables u and v.

Details and Options

The negative derivative of the unit normal of a surface is called the shape operator and measures how the surface bends in different directions (here, v is a tangent vector). Weingarten is the matrix of the shape operator of the local surface given in terms of the components of the fundamental forms with respect to variables u and v.

Examples

Basic Examples (2) 

Define the monkey saddle:

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

Compute the Weingarten matrix:

In[2]:=
ResourceFunction["WeingartenMatrix"][ms, {u, v}]
Out[2]=

Properties and Relations (2) 

A paraboloid:

In[3]:=
paraboloid[a_, b_][u_, v_] := {u, v, a u^2 + b v^2}
In[4]:=
hp = paraboloid[1, -1][u, v];

The Weingarten matrix can be computed using the shape operator:

In[5]:=
metric = Module[{du = \!\(
\*SubscriptBox[\(\[PartialD]\), \(u\)]hp\), dv = \!\(
\*SubscriptBox[\(\[PartialD]\), \(v\)]hp\)}, {{du . du, du . dv}, {du . dv, dv . dv}}]
Out[5]=

Compute the shape operator of the paraboloid:

In[6]:=
ResourceFunction[
ResourceObject[
Association[
   "Name" -> "ShapeOperator", "ShortName" -> "ShapeOperator", "UUID" -> "33429f32-33d3-48a5-83b4-6e96f75adcf2", "ResourceType" -> "Function", "Version" -> "1.0.0", "Description" -> "Compute the shape operator on a surface", "RepositoryLocation" -> URL[
     "https://www.wolframcloud.com/objects/resourcesystem/api/1.0"], "SymbolName" -> "FunctionRepository`$\
a25e1f861fc844ecbd46d00d76465222`ShapeOperator", "FunctionLocation" -> CloudObject[
     "https://www.wolframcloud.com/obj/88707f7c-3422-4bd8-8008-\
63988e41dfdf"]], ResourceSystemBase -> Automatic]][hp, {u, v}]
Out[6]=

The product with the inverse metric:

In[7]:=
ResourceFunction[
ResourceObject[
Association[
     "Name" -> "ShapeOperator", "ShortName" -> "ShapeOperator", "UUID" -> "33429f32-33d3-48a5-83b4-6e96f75adcf2", "ResourceType" -> "Function", "Version" -> "1.0.0", "Description" -> "Compute the shape operator on a surface", "RepositoryLocation" -> URL[
       "https://www.wolframcloud.com/objects/resourcesystem/api/1.0"],
       "SymbolName" -> "FunctionRepository`$\
a25e1f861fc844ecbd46d00d76465222`ShapeOperator", "FunctionLocation" -> CloudObject[
       "https://www.wolframcloud.com/obj/88707f7c-3422-4bd8-8008-\
63988e41dfdf"]], ResourceSystemBase -> Automatic]][hp, {u, v}] . Inverse[metric] // Simplify
Out[7]=

The Weingarten matrix:

In[8]:=
whp = ResourceFunction["WeingartenMatrix"][hp, {u, v}] // Simplify
Out[8]=

We will be comparing with the derivatives of the unit normals:

In[9]:=
ResourceFunction[
ResourceObject[
Association[{
    "Name" -> "UnitNormal", "ShortName" -> "UnitNormal", "UUID" -> "9f36e694-e56f-4026-b221-f6e9ec01bbe1", "ResourceType" -> "Function", "Version" -> "1.0.0", "Description" -> "Compute the unit normal of a surface", "RepositoryLocation" -> URL[
      "https://www.wolframcloud.com/objects/resourcesystem/api/1.0"], "SymbolName" -> "FunctionRepository`$\
623575a8e4674c2793cf4886e263fa40`UnitNormal", "FunctionLocation" -> CloudObject[
      "https://www.wolframcloud.com/obj/54ac252a-86f1-44a7-bde1-\
b0765fa0e4ef"]}], {ResourceSystemBase -> Automatic}]][hp, {u, v}]
Out[9]=

Derivatives of the unit normal:

In[10]:=
Most /@ -{D[%, u], D[%, v]} // FullSimplify
Out[10]=

The Gaussian and the mean curvature:

In[11]:=
{ResourceFunction[
ResourceObject[
Association[{
     "Name" -> "GaussianCurvature", "ShortName" -> "GaussianCurvature", "UUID" -> "8f739cf2-ab2b-4fab-bf6e-34e4ac65627f", "ResourceType" -> "Function", "Version" -> "2.0.0", "Description" -> "Compute the Gaussian curvature of a surface", "RepositoryLocation" -> URL[
       "https://www.wolframcloud.com/objects/resourcesystem/api/1.0"],
       "SymbolName" -> "FunctionRepository`$\
e911ad202e5b4418b3d82c1f6fbf98b8`GaussianCurvature", "FunctionLocation" -> CloudObject[
       "https://www.wolframcloud.com/obj/d98b02db-7981-4b92-a00b-\
1f6fd9703ff1"]}], ResourceSystemBase -> "https://www.wolframcloud.com/objects/\
resourcesystem/api/1.0"]][hp, {u, v}], ResourceFunction[
ResourceObject[
Association[{
     "Name" -> "MeanCurvature", "ShortName" -> "MeanCurvature", "UUID" -> "5a76a367-5cde-4ab1-9c64-c268fe06529f", "ResourceType" -> "Function", "Version" -> "1.0.0", "Description" -> "Compute the mean curvature of a surface", "RepositoryLocation" -> URL[
       "https://www.wolframcloud.com/objects/resourcesystem/api/1.0"],
       "SymbolName" -> "FunctionRepository`$\
9e33acd322514864a142e2d67a96c339`MeanCurvature", "FunctionLocation" -> CloudObject[
       "https://www.wolframcloud.com/obj/ceebbdf2-469c-4e45-b624-\
e474d0ae8c3f"]}], ResourceSystemBase -> "https://www.wolframcloud.com/objects/\
resourcesystem/api/1.0"]][hp, {u, v}]}
Out[11]=

The Gaussian and mean curvatures can be computed from the Weingarten matrix. The Gaussian curvature is equal to the determinant of the Weingarten matrix:

In[12]:=
Det[whp] - ResourceFunction[
ResourceObject[
Association[{
      "Name" -> "GaussianCurvature", "ShortName" -> "GaussianCurvature", "UUID" -> "8f739cf2-ab2b-4fab-bf6e-34e4ac65627f", "ResourceType" -> "Function", "Version" -> "2.0.0", "Description" -> "Compute the Gaussian curvature of a surface",
        "RepositoryLocation" -> URL[
        "https://www.wolframcloud.com/objects/resourcesystem/api/1.0"]\
, "SymbolName" -> "FunctionRepository`$\
e911ad202e5b4418b3d82c1f6fbf98b8`GaussianCurvature", "FunctionLocation" -> CloudObject[
        "https://www.wolframcloud.com/obj/d98b02db-7981-4b92-a00b-\
1f6fd9703ff1"]}], ResourceSystemBase -> "https://www.wolframcloud.com/objects/\
resourcesystem/api/1.0"]][hp, {u, v}] // Simplify
Out[12]=

The mean curvature is equal to half the trace of the Weingarten matrix:

In[13]:=
Tr[whp] - 2 ResourceFunction[
ResourceObject[
Association[{
      "Name" -> "MeanCurvature", "ShortName" -> "MeanCurvature", "UUID" -> "5a76a367-5cde-4ab1-9c64-c268fe06529f", "ResourceType" -> "Function", "Version" -> "1.0.0", "Description" -> "Compute the mean curvature of a surface", "RepositoryLocation" -> URL[
        "https://www.wolframcloud.com/objects/resourcesystem/api/1.0"]\
, "SymbolName" -> "FunctionRepository`$\
9e33acd322514864a142e2d67a96c339`MeanCurvature", "FunctionLocation" -> CloudObject[
        "https://www.wolframcloud.com/obj/ceebbdf2-469c-4e45-b624-\
e474d0ae8c3f"]}], ResourceSystemBase -> "https://www.wolframcloud.com/objects/\
resourcesystem/api/1.0"]][hp, {u, v}]
Out[13]=
In[14]:=
% // FullSimplify
Out[14]=

The principal curvatures are minus the eigenvalues of the Weingarten matrix:

In[15]:=
Eigenvalues[-whp] + ResourceFunction[
ResourceObject[
Association[{
      "Name" -> "PrincipalCurvatures", "ShortName" -> "PrincipalCurvatures", "UUID" -> "6ed847f5-622c-4026-85ab-58cfe555230e", "ResourceType" -> "Function", "Version" -> "1.0.0", "Description" -> "Compute the principal curvatures of a \
surface", "RepositoryLocation" -> URL[
        "https://www.wolframcloud.com/objects/resourcesystem/api/1.0"]\
, "SymbolName" -> "FunctionRepository`$\
36b0191b5cbb4f7abc11e7feb8571bc9`PrincipalCurvatures", "FunctionLocation" -> CloudObject[
        "https://www.wolframcloud.com/obj/ec9a27a2-060b-44c5-a5ed-\
3500d784be88"]}], ResourceSystemBase -> "https://www.wolframcloud.com/objects/\
resourcesystem/api/1.0"]][hp, {u, v}] // Simplify
Out[15]=
In[16]:=
FullSimplify[% // PowerExpand]
Out[16]=

A Monge patch:

In[17]:=
monge[h_][u_, v_] := {u, v, h[u, v]}

The Weingarten matrix:

In[18]:=
ResourceFunction["WeingartenMatrix"][
  monge[h][u, v], {u, v}] // FullSimplify
Out[18]=

Publisher

Enrique Zeleny

Version History

  • 1.0.0 – 04 September 2020

Source Metadata

Related Resources

License Information