Function Repository Resource:

ErikssonCornerAngle

Source Notebook

Evaluate the multidimensional corner angle

Contributed by: Michael Reed

ResourceFunction["ErikssonCornerAngle"][o,{p1,,pd}]

gives the corner angle at the point o and spanned by the vectors p1,,pd.

Details

ResourceFunction["ErikssonCornerAngle"] generalizes the law of sines for d-dimensional Euclidean simplices.

Examples

Basic Examples (2) 

The corner angle at the origin for vectors in two dimensions:

In[1]:=
ResourceFunction["ErikssonCornerAngle"][{0, 0}, {{1, 0}, {0, 1}}]
Out[1]=

The corner angle at the origin for vectors in three dimensions:

In[2]:=
ResourceFunction[
 "ErikssonCornerAngle"][{0, 0, 0}, {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}]
Out[2]=

Scope (1) 

ErikssonCornerAngle works in any number of dimensions:

In[3]:=
ResourceFunction[
 "ErikssonCornerAngle"][{Subscript[o, 1], Subscript[o, 2]}, {{Subscript[x, 1], Subscript[x, 2]}, {Subscript[y, 1], Subscript[y, 2]}}]
Out[3]=
In[4]:=
ResourceFunction[
 "ErikssonCornerAngle"][{Subscript[o, 1], Subscript[o, 2], Subscript[
  o, 3]}, {{Subscript[x, 1], Subscript[x, 2], Subscript[x, 3]}, {Subscript[y, 1], Subscript[y, 2], Subscript[y, 3]}, {Subscript[z, 1], Subscript[z, 2], Subscript[z, 3]}}]
Out[4]=
In[5]:=
ResourceFunction[
 "ErikssonCornerAngle"][{0, 0, 0, 0}, {{Subscript[w, 1], Subscript[w, 2], Subscript[w, 3], Subscript[
   w, 4]}, {Subscript[x, 1], Subscript[x, 2], Subscript[x, 3], Subscript[x, 4]}, {Subscript[y, 1], Subscript[y, 2], Subscript[y, 3], Subscript[y, 4]}, {Subscript[z, 1], Subscript[z, 2], Subscript[
   z, 3], Subscript[z, 4]}}]
Out[5]=

Applications (2) 

Compute the corner angle for various Platonic solids:

In[6]:=
Table[ResourceFunction["ErikssonCornerAngle"][First[#], Rest[#]] &[
   PolyhedronData[pla, "VertexCoordinates"][[
    Prepend[Cases[PolyhedronData[pla, "EdgeIndices"], {1, k_} :> k], 1]]]], {pla, {"Tetrahedron", "Cube", "Dodecahedron"}}] // FullSimplify
Out[6]=

Generate a random simplex:

In[7]:=
sim = RandomVariate[NormalDistribution[], {5, 4}]
Out[7]=

Compute all the corner angles of the simplex:

In[8]:=
Table[ResourceFunction["ErikssonCornerAngle"][sim[[k]], Delete[sim, k]], {k, Length[sim]}]
Out[8]=

Properties and Relations (2) 

In two dimensions, ErikssonCornerAngle is similar to the results of SolidAngle and PlanarAngle:

In[9]:=
Plot[SolidAngle[{0, 0}, {{1, 0}, {1, x}}] - ResourceFunction[
   "ErikssonCornerAngle"][{0, 0}, {{1, 0}, {1, x}}], {x, 0, 1}]
Out[9]=

In three dimensions, the difference between ErikssonCornerAngle and SolidAngle is more apparent:

In[10]:=
Plot[{SolidAngle[{0, 0, 0}, {{1, 0, 0}, {0, 1, 0}, {1, 1, x}}], ResourceFunction[
   "ErikssonCornerAngle"][{0, 0, 0}, {{1, 0, 0}, {0, 1, 0}, {1, 1, x}}]}, {x, 0, 1}]
Out[10]=

Publisher

Michael Reed

Version History

  • 1.0.0 – 20 July 2022

Source Metadata

Related Resources

License Information