# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

Compute the Voronoi entropy of a mesh region

Contributed by:
Jessica Alfonsi (Padova, Italy)

ResourceFunction["MeshVoronoiEntropy"][ computes the Voronoi entropy for the MeshRegion |

The Voronoi entropy of a mesh enables the quantification of the ordering of a 2D tessellated structure according to the following formula *S*_{{XMLElement[i, {}, {XMLElement[span, {class -> stylebox}, {vor}]}]}}=-Σ_{i}*P*_{i}*ln**P*_{i}
where *i *is the number of polygon types, and *P*_{i} is the fraction of polygons possessing *n *sides (edges) in a given Voronoi diagram, i.e. the coordination number of each polygon.

The formula for the Voronoi entropy is similar to the statistical measure of information and entropy in statistical mechanics, which is also known in the literature as Shannon entropy.

The Voronoi entropy is zero for a perfectly ordered structure, where there are polygons of only a single kind, and increases its value with the number of types of polygons. For a fully 2D random distribution, values of *S*_{{XMLElement[i, {}, {XMLElement[span, {class -> stylebox}, {vor}]}]}}=1.71 have been reported in the literature.

Compute the entropy of a hex mesh:

In[1]:= |

Out[1]= |

Generate a set of points arranged in a square lattice:

In[2]:= |

Out[2]= |

Generate the associated mesh region:

In[3]:= |

Out[4]= |

The resulting Voronoi entropy equals zero:

In[5]:= |

Out[5]= |

A Voronoi tessellation built from slightly distorted hexagons has a corresponding entropy equal to zero, since there is only one kind of polygon (P_{1}=1; ln P_{1}=0).

In[6]:= |

Out[6]= |

Generate lattice points from the basis plus distortion:

In[7]:= |

Out[7]= |

Create a mesh:

In[8]:= |

Out[9]= |

In[10]:= |

Out[10]= |

A semi-regular set of points obtained by alternatively deleting sites from a square lattice gives a twin-tile tessellation with regular hexagons and smaller squares:

In[11]:= |

Out[5]= |

Generate the corresponding mesh:

In[12]:= |

Out[7]= |

The Voronoi entropy is =0.6365:

In[13]:= |

Out[13]= |

A hexagonal lattice basis:

In[14]:= |

Out[14]= |

Add distortions:

In[15]:= |

Out[15]= |

Create an irregular hexagonal mesh:

In[16]:= |

Out[17]= |

A Voronoi tessellation built from slightly distorted hexagons has a corresponding entropy still equal to zero, since there is only one kind of polygon (P_{1}=1; ln P_{1}=0):

In[18]:= |

Out[18]= |

By increasing the distortion, the Voronoi entropy increases in value:

In[19]:= |

In[20]:= |

Out[21]= |

In[22]:= |

Out[22]= |

Create a 2D set of points obtained from a spatial Poisson point process:

In[23]:= |

Out[26]= |

Generate a Voronoi mesh and show it along with the points:

In[27]:= |

Out[27]= |

The Voronoi entropy is *S*_{{XMLElement[i, {}, {XMLElement[span, {class -> stylebox}, {vor}]}]}}=1.71 according to the value reported in the literature for a randomly distributed set of points:

In[28]:= |

Out[28]= |

Wolfram Language 13.0 (December 2021) or above

- 1.0.0 – 03 May 2024

This work is licensed under a Creative Commons Attribution 4.0 International License