In my research, I've recently started to play with Voronoi tessellations. I currently have a Python code that creates the tessellation and I am trying to color the polygonal regions according to their regularity. The best-case scenario would be to have a color scale (let's say from red to blue) where regions in red would be the "most irregular" (in some sense) and regions in blue would be the "most regular" (in some sense). It is not strictly necessary to have a scale; I would happily settle to color regions by range, e.g., if the region is "very irregular" I color it red, if it is "sort of regular" I color it yellow and if it is "regular" I color it green.

What I am looking for is a way to associate a number to say how regular a polygon is (for now, I am more interested in hexagons, but it wouldn't hurt to have something for a general polygon).

For example, the first idea that came to mind was taking the average of the angles and measuring the difference from this average to the expected internal angle of the hexagon (which is $2\pi/3$), but this does not work because the average is always $2\pi/3$ since the polygons I'm working with are always convex.

Some ideas that I have discussed with my advisor are

- looking at $\bar{D}/\sigma(D)$, where $D$ is the set of distances from the vertices of the polygon to it's center, $\bar{D}$ is the average of $D$ and $\sigma(D)$ is the standard deviation of $D$. This ratio ranges from 0 ("maximum" irregularity) to $\infty$ ("maximum" regularity);
- looking only at $\sigma(D)$, which ranges from 0 ("maximum" regularity) to $\infty$ ("maximum" irregularity).

If possible, I would like to work only with angles due to the way the code I have produces the Voronoi tessellation. However, my intuition says that either

- I'll have to forget angles altogether and look only at distances;
- I'll have to look at angles and at distances.

Therefore, my question is: is there such a metric for characterizing the regularity of a polygon that involves only the internal angles? If not, is there a more interesting metric that involves distances than the ones I listed above?

I would be more than happy to share more information about the problem if need be.

**Edit:** this picture it a prototype to what I am trying to do.
The green regions are hexagons (regular or not), the white ones are the infinite regions of the tessellation and the red ones are the finite regions that are not hexagons.

3more comments