# How to measure the irregularity of a hexagon?

I need to evaluate the quality of a list of machine parts, which roughly has one center point surrounded by 6 exterior points. If the quality is good, then the 6 exterior points will form a regular hexagon and the center point will locate in the very center of the hexagon; but if the quality is low, then either the exterior points will form an irregular hexagon, or the center point is not in the center of the hexagon, or both. So I need to measure the irregularity of a given hexagon.

Intuitively, a regular hexagon should be the least irregular; other hexagons should be more irregular; and when the seven points form a line, this should be the most irregular. I drawed a figure to illustrate this: (The center point is in red and the exterior points are in yellow)

Note: the center point is not necessarily located in the center of the hexagon, and its position also affects the irregularity.

I hope the metric of hexagon irregularity could have the following properties:

1. Irrelevant to the choice of axis. Namely, congruent hexagons have the same irregularity.
2. Irrelevant to the area of the hexagon. Namely, similar hexagons have the same irregularity.
3. Bounded to $[0,1]$. Irregularity equals 0 if and only if it is a regular hexagon.
4. Easy to calculate. I have a large number of such hexagons to evaluate, so I hope it won't be time-consuming.

This definition of hexagon irregularity may be similar to that of roundness, which is defined as $R=\frac{4\pi S}{C^2}$, while $S$ and $C$ are the area and perimeter of the shape, respectively.

I have tried the following definitions. First let's define the distance between the center point to the 6 exterior points as the radii (there are 6 radii for each hexagon). I drawed another figure to illustrate these ideas:

1. Define the coefficient of variance (CV) of the 6 radii as the hexagon irregularity. Then the hexagon B will have the same irregularity as hexagon A (regular hexagon).
2. Define the CV of the 6 angles spanned by the center point to exterior points as the hexagon irregularity. Then the hexagon C will have the same irregularity as the hexagon A.
3. Define the CV of the 6 internal angles as the hexagon irregularity. Then the hexagon D will have the same irregularity as the hexagon A. (Yes, the location of the center point also counts. )
4. Define the CV of the 6 edges as the hexagon irregularity. It's obviously not working, otherwise the hexagon can be squeezed without changing its irregularity.
5. Define the CV of both the 6 edges and the 6 radii as the hexagon irregularity. It seems working, but I failed to prove its boundedness.

By far Definition 5 seems to be the best and is practically useful. However, I would like to know if there are better definitions.

I'm newbie here, and I'm afraid this question may be still vague since irregularity is really a fuzzy concept. If any details need to be improved, please inform.

• Have you considered trying to find such an irregularity for a triangle and then summing the irregularities of the triangles forming the hexagon? – GBQT Oct 30 '15 at 9:49
• I'd try something like sum of squares of deviations of all vertices (including the center) from their ideal positions – HEKTO Oct 30 '15 at 17:11
• @HEKTO To get the ideal positions may be complicated and require an optimization algorithm. – Wei Feng Oct 31 '15 at 8:05
• @GBQT It is a good reduction to consider the irregularity for a triangle instead. Intuitively, it may be defined as the CV of the 3 edges, which is bounded to $[0,\frac{\sqrt{2}}{2}]$. Thank you! – Wei Feng Oct 31 '15 at 8:46
• Well, by ideal positions I meant the center and vertices of regular polygon – HEKTO Nov 1 '15 at 15:04

Let us denote with:

• $$P_0$$ the central point,
• $$P_1, \ldots, P_6$$ the external points (numbered such that when walking counter-clockwise along the perimeter of the hexagon, one encounters them in increasing order),
• $$T_i$$ the triangle with vertices $$P_0, P_i, P_{i+1}$$ ($$T_6$$ with vertices $$P_0, P_6, P_1$$),
• $$\alpha_{i,j},\ j\in\{1,2,3\}$$ the three internal angles of triangle $$T_i$$.

My proposal is to define the irregularity measure $$M$$ of the hexagon as: $$M = \displaystyle \frac{1}{6\pi} \cdot \sum_{i=1}^6\left(\max_{j \in \{1,2,3\}}\{\alpha_{i,j}\} - \min_{j \in \{1,2,3\}}\{\alpha_{i,j}\}\right).$$

Now let's prove that $$M$$ satisfies the properties requested.

1. Since $$M$$ is based only on angles, and angles are preserved by rotations, $$M$$ is independent on the choice of axis.
2. Since $$M$$ is based only on angles, and angles are preserved by dilations, $$M$$ is independent on the hexagon extension.
3. $$0 \leq M \leq 1$$ because is the normalized sum of six terms, each of them non negative and less than or equal to $$\pi$$. If the hexagon is regular and $$P_0$$ coincides with the center of the hexagon, then $$\alpha_{i,j} = \pi/3, \ \forall i \in \{1,2,3\}, \forall j \in \{1, \ldots, 6\}$$. Hence every term of the sum is zero, and $$M = 0.$$ For the converse, if $$M = 0$$, then each of the six terms must be $$0$$, hence for each triangle $$T_i$$ the maximum and the minimum of the angles coincide, so $$\alpha_{i,1} = \alpha_{i,2} =\alpha_{i,3} = \pi/3,\ \forall i \in \{1,\ldots, 6\}$$ and the hexagon is regular with $$P_0$$ coincident with its center.
4. The word easy is subject to interpretation. Anyway, the bulk of the calculation of $$M$$ is the computation of $$12$$ angles ($$6$$ are deduced with the formula $$\alpha_{i,3} = \pi - \alpha_{i,1} - \alpha_{i,2}$$). I suppose this can be considered quite easy, since $$6$$ angles were needed for the metrics you proposed.

Other similar definitions for $$M$$ are possible like, e.g., $$M =\displaystyle \frac{\displaystyle\max_{i, j}\alpha_{i,j} - \min_{i, j}\alpha_{i,j}}{\pi}.$$