Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Get the measure of a simplex or simplicial complex
ResourceFunction["SimplexMeasure"][simplex] gives the measure of simplex. | |
ResourceFunction["SimplexMeasure"][{simplex1,simplex2,…}] gives the measure of the simplicial complex containing simplex1,simplex2,…. | |
ResourceFunction["SimplexMeasure"][complex,d] gives the d-dimensional measure of complex. |
Point[v] | a point |
Line[{v1,v2}] | a line segment |
Triangle[{v1,v2,v3}] or Polygon[{v1,v2,v3}] | a filled triangle |
Tetrahedron[{v1,v2,v3,v4}] | a filled tetrahedron |
Simplex[{v1,v2,…,vn}] | an n-1 dimensional simplex |
{simplex1,simplex2,…} | a list of simplices |
{{v1,2,…,v1,n},{v2,2,…,v2,n},…} | a list of lists of vertices |
MeshRegion[…] | a mesh region |
BoundaryMeshRegion[…] | a boundary mesh region |
Get the measure of a Simplex:
In[1]:= | ![]() |
Out[1]= | ![]() |
Compare to Euclidean distance:
In[2]:= | ![]() |
Out[2]= | ![]() |
Get the measure of a Triangle:
In[3]:= | ![]() |
Out[3]= | ![]() |
Compare to Area:
In[4]:= | ![]() |
Out[4]= | ![]() |
Get the measure of a random 100-dimensional Simplex:
In[5]:= | ![]() |
Out[5]= | ![]() |
Get the measure of a simplicial complex, represented as a list of simplices:
In[6]:= | ![]() |
Out[6]= | ![]() |
Get the measure of a simplicial complex, represented by lists of vertices:
In[7]:= | ![]() |
Out[7]= | ![]() |
Specify a dimension to measure:
In[8]:= | ![]() |
Out[8]= | ![]() |
In[9]:= | ![]() |
Out[9]= | ![]() |
In[10]:= | ![]() |
Out[10]= | ![]() |
Get the measure of a MeshRegion:
In[11]:= | ![]() |
Out[11]= | ![]() |
In[12]:= | ![]() |
Out[12]= | ![]() |
The measure for Point corresponds to counts:
In[13]:= | ![]() |
Out[13]= | ![]() |
In[14]:= | ![]() |
Out[14]= | ![]() |
In[15]:= | ![]() |
Out[15]= | ![]() |
For mesh regions, SimplexMeasure is equivalent to RegionMeasure:
In[16]:= | ![]() |
Out[16]= | ![]() |
In[17]:= | ![]() |
Out[17]= | ![]() |
In[18]:= | ![]() |
Out[18]= | ![]() |
SimplexMeasure works for arbitrary dimension:
In[19]:= | ![]() |
Out[19]= | ![]() |
In[20]:= | ![]() |
Out[20]= | ![]() |
Compare to RegionMeasure:
In[21]:= | ![]() |
Out[21]= | ![]() |
SimplexMeasure performs best when given lists of vertices as an array:
In[22]:= | ![]() |
In[23]:= | ![]() |
Out[23]= | ![]() |
In[24]:= | ![]() |
Out[24]= | ![]() |
Get the measure of the first 10 standard simplices:
In[25]:= | ![]() |
Out[25]= | ![]() |
In[26]:= | ![]() |
Out[26]= | ![]() |
Here’s the corresponding formula:
In[27]:= | ![]() |
Out[27]= | ![]() |
SimplexMeasure uses more efficient methods for simplicial complexes below 6 dimensions:
In[28]:= | ![]() |
Out[26]= | ![]() |
In[29]:= | ![]() |
Out[29]= | ![]() |
Measure a simplex and its boundary:
In[30]:= | ![]() |
Out[26]= | ![]() |
In[31]:= | ![]() |
Out[31]= | ![]() |
In[32]:= | ![]() |
Out[32]= | ![]() |
SimplexMeasure is not supported for abstract simplices:
In[33]:= | ![]() |
Out[33]= | ![]() |
In[34]:= | ![]() |
Out[34]= | ![]() |
In[35]:= | ![]() |
Out[35]= | ![]() |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License