Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

Rigid motions on \(\mathbb {R}^2\) are fundamental transformations in 2D image processing. They are isometric and bijective. Nevertheless, digitized rigid motions are, in general, non-bijective. Despite many efforts during the last twenty years, the topological and geometric defects of digitized rigid motions on the square grid are still not fully understood. According to Nouvel and Rémila, this problem is not related to a limitation of arithmetic precision, but arises as a deep incompatibility between the square grid and rotations [1].

Pioneering contributions to two-dimensional digital geometry in the square grid were made in 1970s (see [2, 3] for a survey). The main reason for taking this Cartesian approach was that objects defined on the square grid are easy to address in the computer memory, as well as image acquisition devices, whose sensors are generally organized on square grids. Moreover, the square grid has a direct extension to higher dimensions. However, such a Cartesian framework suffers from fundamental topological problems and therefore one has to choose different connectivity relations for objects of interest and their complements [2], or use a cell-complex framework [4], for example.

On the contrary, the regular hexagonal grid (called hereafter the hexagonal grid) suffers less from these problems since it possesses the following properties: equidistant neighbors – each hexagon has six equidistant neighbors; uniform connectivity – there is only one type of connectivity [5, 6]. However, operations such as a sampling of continuous signals with the hexagonal grids are often computationally more expensive than ones defined on the square grid. Indeed, a digitization operator on the square grid can be defined by a rounding function, while there is no such counterpart on the hexagonal grid. Nevertheless, a practically useful digitization operator on a hexagonal grid has been proposed by Her [7].

Motivated by aforementioned issues, we study the differences between digitized rigid motions defined on both types of grids. To understand these differences, we establish a framework for studying digitized rigid motions on the hexagonal grid at a local scale. Our approach is an extension to the hexagonal grid of the former study of digitized rigid motions of the square grid, which is based on neighborhood motion maps [8]. This enables us to study the structure of groups induced by images of digitized rigid motions. It also allows us to focus on the issue of the information preservation under digitized rigid motions defined on the two grids. We provide a comparison of the information loss between the hexagonal and square grids. In addition, we present a complete list of neighborhood motion maps for the 6-neighborhood in Appendix.

2 Digitizing on the Hexagonal Grid

2.1 Hexagonal Grid

A hexagonal grid \(\mathcal {H}\) is a grid formed by a tessellation of \(\mathbb {R}^2\) by regular hexagons of side length \(1/\sqrt{3}\), as illustrated in Fig. 1. Let us consider the center points of these hexagons, ı.e. the points of the underlying lattice \(\varLambda = \mathbb {Z}\varvec{\epsilon }_1 \oplus \mathbb {Z}\varvec{\epsilon }_2\) (see Fig. 1(a)) where \(\varvec{\epsilon }_1 = \left( 1, 0 \right) ^t\) and \(\varvec{\epsilon }_2 = \left( -\frac{1}{2}, \frac{\sqrt{3}}{2} \right) ^t\). We can then regard \(\mathcal {H}\) as the boundary of the Voronoi tessellation of \(\mathbb {R}^2\) associated with the lattice \(\varLambda \).

Fig. 1.
figure 1

A visualization of a part of the hexagonal grid (a) The arrows represent the base of the underlying lattice \(\varLambda \) with the white dots representing its elements. (b) Examples of three different point statuses induced by a rigid motion \(\varvec{\mathcal {U}}\) on the hexagonal grid: digitization cells corresponding to 0- and 2-points are marked by green lined, red dotted patterns and labeled, with their status numbers, respectively. The white dots indicate the positions of the images of the points of the initial set \(\varLambda \) under \(\varvec{\mathcal {U}}\)

2.2 Digitized Rigid Motions

Rigid motions on \(\mathbb {R}^2\) are isometric maps defined as

$$\begin{aligned} \left| \begin{array}{lllll} \varvec{\mathcal {U}}&{} : &{} \mathbb {R}^2 &{} \rightarrow &{} \mathbb {R}^2 \\ &{} &{} \mathbf {x}&{} \mapsto &{} \mathbf {R}\mathbf {x}+ \mathbf {t}\end{array} \right. \end{aligned}$$
(1)

where \(\mathbf {t}\in \mathbb {R}^2\) is a translation vector and \(\mathbf {R}\) is a rotation matrix.

According to Eq. (1), we generally have \(\varvec{\mathcal {U}}(\varLambda ) \nsubseteq \varLambda \). As a consequence, in order to define digitized rigid motions as maps from \(\varLambda \) to \(\varLambda \), we commonly apply rigid motions on \(\varLambda \) as a part of \(\mathbb {R}^2\) and then combine the results with a digitization operator. To define such a digitization operator on \(\varLambda \), let us first define a digitization cell of \(\varvec{\kappa }\in \varLambda \)

$$\begin{aligned} \mathscr {C}(\varvec{\kappa }) = \Bigg \{ \mathbf {x}\in \mathbb {R}^2 \left. \;|\;\, \begin{array}{l} \forall \varvec{\beta } \in B, (\, \Vert \mathbf {x}- \varvec{\kappa }\Vert \le \Vert \mathbf {x}- \varvec{\kappa } + \varvec{\beta }\Vert ) \wedge (\Vert \mathbf {x}- \varvec{\kappa }\Vert < \Vert \mathbf {x}- \varvec{\kappa } - \varvec{\beta }\Vert ) \end{array} \right. \Bigg \}\,, \end{aligned}$$

where \(B = \{\varvec{\epsilon }_1, \varvec{\epsilon }_2, \varvec{\epsilon }_1 + \varvec{\epsilon }_2 \} \subset \varLambda \). The digitization operator is then defined as a function \(\mathcal {D}: \mathbb {R}^2 \rightarrow \varLambda \) such that \(\forall \mathbf {x}\in \mathbb {R}^2, \exists ! \mathcal {D}(\mathbf {x}) \in \varLambda \) and \(\mathbf {x}\in \mathscr {C}(\mathcal {D}(\mathbf {x}))\). We finally define digitized rigid motions as \(U = \mathcal {D}\circ \varvec{\mathcal {U}}_{\mid \varLambda }\). Note that this definition of the digitization operator is rather theoretical but not computationally relevant. For readers who are interested in implementing digitization operators in the hexagonal grid, we advise the method proposed by Her [7].

Due to the behavior of \(\mathcal {D}\), that maps \(\mathbb {R}^2\) onto \(\varLambda \), digitized rigid motions are, most of the time, non-bijective. This leads us to define a notion of point status with respect to digitized rigid motions, as in the case of the square grid [9].

Definition 1

Let \(\varvec{\lambda }\in \varLambda \). The set of preimages of \(\varvec{\lambda }\in \varLambda \) with respect to U is defined as \(S_U(\varvec{\lambda }) = \{ \varvec{\kappa }\in \varLambda \mid U(\varvec{\kappa }) = \varvec{\lambda }\}\), and \(\varvec{\lambda }\) is referred to as an s-point where \(s = |S_U(\varvec{\lambda })|\) and is called the status of \(\varvec{\lambda }\).

Remark 2

For any \(\varvec{\lambda }\in \varLambda \), \(|S_U(\varvec{\lambda })| \in \{0,1,2\}\). From the digitization cell geometry, we have that \(|S_U(\varvec{\lambda })| = 2\) only when two preimages \(\varvec{\kappa }, \varvec{\sigma }\in S_U(\varvec{\lambda })\) satisfy \(\Vert \varvec{\kappa }- \varvec{\sigma }\Vert _2 = 1\).

The non-injective and non-surjective behaviors of digitized rigid motions result in the existence of 2- and 0-points, respectively (see Fig. 1(b)).

3 Neighborhood Motion Maps and Remainder Range Partitioning

3.1 Neighborhood Motion Maps

In \(\mathbb {R}^2\), an intuitive way to define the neighborhood of a point \(\mathbf {x}\) is to consider the set of points that lie within a ball of a given radius centered at \(\mathbf {x}\). This metric definition actually remains valid in \(\varLambda \) and it allows us to retrieve the classical notion of neighborhood based on adjacency relations.

Definition 3

(Neighbourhood). The neighborhood of \(\varvec{\kappa } \in \varLambda \) (of a squared radius \(r \in \mathbb {R}_+\) ), denoted \(\mathcal {N}_r(\varvec{\kappa })\), is defined as \(\mathcal {N}_r(\varvec{\kappa }) = \big \{ \varvec{\kappa } + \varvec{\delta } \in \varLambda \mid \Vert \varvec{\delta }\Vert _2^2 \le r \big \}.\)

Remark 4

\(\mathcal {N}_1\) corresponds to the 6-neighborhood which is the smallest, non-trivial and isotropic neighborhood of \(\varvec{\kappa }\in \varLambda \).

As stated above, the non-injective and/or non-surjective behavior of a digitized rigid motion may result in the existence of 2- and/or 0-points. In other words, given a point \(\varvec{\kappa }\in \varLambda \), the image of its neighborhood \(\mathcal {N}_r(\varvec{\kappa })\) may be distributed in a non-homogeneous fashion within the neighborhood of the image \(\mathcal {N}_{r'}(U(\varvec{\kappa })), r \le r'\), of \(\varvec{\kappa }\) with respect to the digitized rigid motion U.

In order to track these local alterations of the neighborhood of \(\varvec{\kappa }\in \varLambda \), we consider the notion of a neighborhood motion map on \(\varLambda \) defined as a set of vectors, each representing the rigid motion of a neighbor.

Definition 5

(Neighborhood motion map). The neighborhood motion map of \(\varvec{\kappa }\in \varLambda \) with respect to a digitized rigid motion U and \(r \in \mathbb {R}_+\) is the function defined as

$$\begin{aligned} \left| \begin{array}{lllll} \mathcal {G}^U_r(\varvec{\kappa }) &{} : &{} \mathcal {N}_r(\mathbf {0}) &{} \longrightarrow &{} \mathcal {N}_{r'}(\mathbf {0}) \\ &{} &{} \varvec{\delta }&{} \longmapsto &{} U(\varvec{\kappa }+ \varvec{\delta }) - U(\varvec{\kappa }) \end{array} \right. \end{aligned}$$

where \(r' \ge r\).

In other words, \(\mathcal {G}^U_r(\varvec{\kappa })\) associates to each relative position of a point \(\varvec{\kappa }+ \varvec{\delta }\) in the neighborhood of \(\varvec{\kappa }\), the relative position of the image \(U(\varvec{\kappa }+ \varvec{\delta })\) in the neighborhood of \(U(\varvec{\kappa })\).

Remark 6

The maximal squared radius \(r'\) of the new neighborhood \(U(\mathcal {N}_r(\varvec{\kappa }))\) is slightly larger than r, due to digitization effect. In particular, we have \(r' = 4\) for \(r = 1\).

For a better understanding of \(\mathcal {G}^U_r(\varvec{\kappa })\), we will consider a visual representation of the \(\mathcal {G}^U_r(\varvec{\kappa })\) functions as label maps. A first—reference—map \(\mathscr {L}_r\) associates a specific color label to each point \(\varvec{\delta }\) of \(\mathcal {N}_r(\mathbf {0})\) for a given squared radius r (see Fig. 2(a) for the map \(\mathscr {L}_1\)). A second map \(\mathscr {L}_r^U(\varvec{\kappa })\)—associated to \(\mathcal {G}^U_r(\varvec{\kappa })\), i.e. to a point \(\varvec{\kappa }\) and a digitized rigid motion U—associates to each point \(\varvec{\sigma }\) of \(\mathcal {N}_{r'}(\mathbf {0})\) the labels of all the points \(\varvec{\delta }\in \mathcal {N}_r(\mathbf {0})\) such that \(U(\varvec{\kappa }+ \varvec{\delta }) - U(\varvec{\kappa }) = \varvec{\sigma }\). Each \(\varvec{\sigma }\) may contain 0, 1 or 2 labels, due to the various possible statuses of points of \(\varLambda \) under digitized rigid motions (see Remark 2). Figures 2(b–c) provide some examples.

Note that a similar idea was previously proposed to study local alterations of the neighborhood \(\mathcal {N}_1\) under 2D digitized rotations [1], and local alterations of \(\mathcal {N}_r\) under 2D digitized rigid motions [8] defined on the square grid.

Fig. 2.
figure 2

(a) The reference label map \(\mathscr {L}_1\). (b–c) Examples of label maps \(\mathscr {L}_1^U(\varvec{\kappa })\). (b) Each point contains at most one label: the rigid motion \(U_{|\mathcal {N}_1(\varvec{\kappa })}\) is then locally injective. (c) One point contains two labels: \(U_{|\mathcal {N}_1(\varvec{\kappa })}\) is then non-injective

3.2 Remainder Range Partitioning

Digitized rigid motions \(U = \mathcal {D}\ \circ \ \varvec{\mathcal {U}}_{|\varLambda }\) are piecewise constant, which is a consequence of the nature of \(\mathcal {D}\). In other words, the neighborhood motion map \(\mathcal {G}^U_r(\varvec{\kappa })\) evolves non-continuously according to the parameters of \(\varvec{\mathcal {U}}\) that underlies U. Our purpose is now to express how \(\mathcal {G}^U_r(\varvec{\kappa })\) evolves.

Let us consider a point \(\varvec{\kappa }+ \varvec{\delta }\in \varLambda \) in the neighborhood \(\mathcal {N}_r(\varvec{\kappa })\) of \(\varvec{\kappa }\). From Formula (1), we have

$$\begin{aligned} \varvec{\mathcal {U}}(\varvec{\kappa }+ \varvec{\delta }) = \mathbf {R}\varvec{\delta }+ \varvec{\mathcal {U}}(\varvec{\kappa }). \end{aligned}$$
(2)

We know that \(\varvec{\mathcal {U}}(\varvec{\kappa })\) lies in a digitization cell \(\mathscr {C}(U(\varvec{\kappa }))\) centered at \(U(\varvec{\kappa })\), which implies that there exists a value \(\rho (\varvec{\kappa }) = \varvec{\mathcal {U}}(\varvec{\kappa }) - U(\varvec{\kappa }) \in \mathscr {C}(\mathbf {0})\).

Definition 7

The coordinates of \(\rho (\varvec{\kappa })\), called the remainder of \(\varvec{\kappa }\) under \(\varvec{\mathcal {U}}\), are the fractional parts of the coordinates of \(\varvec{\mathcal {U}}(\varvec{\kappa })\) and \(\rho \) is called the remainder map under \(\varvec{\mathcal {U}}\).

As \(\rho (\varvec{\kappa }) \in \mathscr {C}(\mathbf {0})\), this range \(\mathscr {C}(\mathbf {0})\) is called the remainder range. Using \(\rho \), we can rewrite Eq. (2) as \( \varvec{\mathcal {U}}(\varvec{\kappa }+ \varvec{\delta }) = \mathbf {R}\varvec{\delta }+ \rho (\varvec{\kappa }) + U(\varvec{\kappa }).\)

Without loss of generality, we can consider that \(U(\varvec{\kappa })\) is the origin of a local coordinate frame of the image space, i.e. \(\varvec{\mathcal {U}}(\varvec{\kappa }) \in \mathscr {C}(\mathbf {0})\). In such local coordinate frame, the former equation rewrites as \( \varvec{\mathcal {U}}(\varvec{\kappa }+ \varvec{\delta }) = \mathbf {R}\varvec{\delta }+ \rho (\varvec{\kappa }).\) Still under this assumption, studying the non-continuous evolution of the neighborhood motion map \(\mathcal {G}^U_r(\varvec{\kappa })\) is equivalent to studying the behavior of \(U(\varvec{\kappa }+ \varvec{\delta }) = \mathcal {D}\ \circ \ \varvec{\mathcal {U}}(\varvec{\kappa }+ \varvec{\delta })\) for \(\varvec{\delta }\in \mathcal {N}_r(\mathbf {0})\) and \(\varvec{\kappa }\in \varLambda \), with respect to the rotation angle \(\theta \) defining \(\mathbf {R}\) and the translation embedded in \(\rho (\varvec{\kappa }) = (x,y) \in \mathscr {C}(\mathbf {0})\), that deterministically depends on \((x,y,\theta )\). The discontinuities of \(U(\varvec{\kappa }+ \varvec{\delta })\) occur when \(\varvec{\mathcal {U}}(\varvec{\kappa }+ \varvec{\delta })\) is on the boundary of a digitization cell. These critical cases related to \(\varvec{\mathcal {U}}(\varvec{\kappa }+ \varvec{\delta })\) can be observed via the relative positions of \(\rho (\varvec{\kappa })\), which are formulated by the translated hexagonal grid \(\mathcal {H} - \mathbf {R}\varvec{\delta }\), more precisely \(\mathscr {C}(\mathbf {0}) \cap (\mathcal {H} - \mathbf {R}\varvec{\delta })\). Let us consider \(\mathcal {H}- \mathbf {R}\varvec{\delta }\) for all \(\varvec{\delta }\in \mathcal {N}_r(\mathbf {0})\) in \(\mathscr {C}(\mathbf {0})\), namely \(\mathscr {H} = \bigcup \limits _{\varvec{\delta }\in \mathcal {N}_r(\mathbf {0})} (\mathcal {H}- \mathbf {R}\varvec{\delta })\). Then \(\mathscr {C}(\mathbf {0})\cap \mathscr {H}\) subdivides the remainder range into regions, as illustrated in Figs. 3 and 4 for \(r=1\), called frames. Compared to the remainder range of the square grid [8], the geometry of the frames is relatively complex (see Fig. 4). From the definition, we have the following proposition.

Proposition 8

For any \(\varvec{\lambda }, \varvec{\kappa }\in \varLambda \), \(\mathcal {G}_r^U(\varvec{\lambda }) = \mathcal {G}_r^U(\varvec{\kappa })\) iff \(\rho (\varvec{\lambda })\) and \(\rho (\varvec{\kappa })\) are in the same frame.

Fig. 3.
figure 3

The remainder range \(\mathscr {C}(\mathbf {0})\) intersected with the translated hexagonal grids \(\mathcal {H}-\mathbf {R}\varvec{\delta }, \varvec{\delta }\in \mathcal {N}_1(\mathbf {0})\) for rotation angle \(\theta = \frac{\pi }{12}\). Each hexagonal grid \(\mathcal {H}-\mathbf {R}\varvec{\delta }\) is colored with respect to each \(\varvec{\delta }\in \mathcal {N}_1(\mathbf {0})\) in the reference label map \(\mathscr {L}_1\) (see Fig. 2)

Fig. 4.
figure 4

Three different partitions of the remainder range \(\mathscr {C}(\mathbf {0})\) depending on rotation angles. (a) \(\theta _1 = {\pi }/{12} \in (\alpha _0, \alpha _1)\), together with non-injective zones marked by a lined pattern. (b) \(\theta _2 = {357}/{1000} \in (\alpha _1, \alpha _2)\) and (c) \(\theta _3 = {19}/{40} \in (\alpha _2, \alpha _3)\). The color of each \(\mathcal {H}-\mathbf {R}\varvec{\delta }\) corresponds to that of each neighbor \(\varvec{\delta }\) in the label map \(\mathscr {L}_1\)

3.3 Generating Neighborhood Motion Maps for \(r = 1\)

From the above discussion, it is plain that a partition of the remainder range given by \(\mathscr {C}(\mathbf {0})\cap \mathscr {H}\) depends on the rotation angle \(\theta \). In order to detect the set of all neighborhood motion maps for \(r=1\), i.e. equivalence classes of rigid motions \(U_{|\mathcal {N}_1(\varvec{\kappa })}\), we need to consider critical angles that lead to topological changes of \(\mathscr {C}(\mathbf {0})\cap \mathscr {H}\). Indeed, from Proposition 8, we know that this is equivalent to computing all different frames in the remainder range. Such changes occur when at least one frame has a null area, i.e. when at least two parallel line segments which bound a frame have their intersection equal to a line segment. To illustrate this issue, let us consider the minimal distance among the distances between all pairs of the parallel line segments. Thanks to rotational symmetries by an angle of \(\frac{\pi }{6}\), and based on the above discussion, we can restrict, without loss of generality, the parameter space of \((x,y,\theta )\) to \(\mathscr {C}(\mathbf {0})\times \left[ 0,\frac{\pi }{6}\right] \). Then, we found that there exist two critical angles between 0 and \(\frac{\pi }{6}\), denoted by \(\alpha _1\) and \(\alpha _2\), with \(0< \alpha _1< \alpha _2 < \frac{\pi }{6}\). Note that the angles 0 and \(\frac{\pi }{6}\) are also critical, and denoted \(\alpha _0\) and \(\alpha _3\), respectively. Figure 4 presents three different partitions of the remainder range for angles \(\theta _1 \in (\alpha _0, \alpha _1), \theta _2 \in (\alpha _1, \alpha _2)\) and \(\theta _3 \in (\alpha _2, \alpha _3)\), respectively.

Based on this knowledge on critical angles, we can observe the set of all distinct neighborhood motion maps \( \mathbb {M}_r = \bigcup \limits _{\varvec{\mathcal {U}}\in \mathbb {U}} \bigcup \limits _{\varvec{\kappa }\in \varLambda } \left\{ \mathcal {G}_r^U(\varvec{\kappa })\right\} \) where \(\mathbb {U}\) is the set of all rigid motions \(\varvec{\mathcal {U}}\) defined by the restricted parameter space \(\mathscr {C}(\mathbf {0})\times \left[ 0, \frac{\pi }{6}\right] \). The cardinality of \(\mathbb {M}_1\) is equal to 67. It should be noticed that \(\big |\bigcup \limits _{\varvec{\kappa }\in \varLambda } \big \{ \mathcal {G}_1^U(\varvec{\kappa }) \big \} \big |\) is constant: 49 for any \(\varvec{\mathcal {U}}\), except for \(\theta = \alpha _i,i \in \{0,1,2,3\}\). Indeed, we have \(\big |\bigcup \limits _{\varvec{\kappa }\in \varLambda } \big \{ \mathcal {G}_1^U(\varvec{\kappa }) \big \} \big | = 1\) for \(\theta = \alpha _0\), 43 for \(\theta = \alpha _1\), 37 for \(\theta = \alpha _2\) and 30 for \(\theta = \alpha _3\). Such elements of the set \(\mathbb {M}_1\) are presented in Appendix.

4 Eisenstein Rational Rotations

In this section, we study the images of the remainder map \(\rho \) with respect to the parameters of the underlying rigid motion. In the case of the square grid, it is known that only for rotations with rational cosine and sine, i.e. rotations given by Pythagorean primitive triples, the remainder map does have a finite number of images; furthermore these images form a group [1, 8, 10]. When, on the contrary, cosine or/and sine are irrational, the images form an infinite and dense set: any ball of non-zero radius in the remainder range intersects images of the remainder map. We will show that, in the hexagonal grid case, a similar result is obtained for rotations corresponding to the counterparts of the Pythagorean primitive triples in the hexagonal lattice. These are called Eisenstein primitive triples, namely triples \((a,b,c) \in \mathbb {Z}^3\) such that \(0< a< c < b\), \(\gcd (a,b,c) = 1\) and \(a^2 - a b + b^2 = c^2\) [11, 12]. We shall say that the rotation matrix \(\mathbf {R}\) is Eisenstein rational if

$$ \mathbf {R}= \left[ \begin{array}{cc} \frac{2 a - b}{2 c} &{} -\frac{\sqrt{3} b}{2 c} \\ \frac{\sqrt{3} b}{2 c} &{} \frac{2 a - b}{2 c} \\ \end{array} \right] = \frac{a}{c} \left[ \begin{array}{cc} 1 &{} 0 \\ 0 &{} 1 \\ \end{array} \right] + \frac{b}{c} \left[ \begin{array}{cc} - \frac{1}{2} &{} -\frac{\sqrt{3}}{2} \\ \frac{\sqrt{3}}{2} &{} \frac{1}{2} \\ \end{array} \right] $$

where (abc) is an Eisenstein primitive triple. We must note that any rotation matrix can be written in this form, with abc real numbers, not Eisenstein triples (and not even integers in general).

To begin, we focus on the rotation part of a rigid motion and define a group \( \mathscr {G}= \mathbb {Z}\mathbf {R}\varvec{\epsilon }_1 \oplus \mathbb {Z}\mathbf {R}\varvec{\epsilon }_2 \oplus \mathbb {Z}\varvec{\epsilon }_1 \oplus \mathbb {Z}\varvec{\epsilon }_2 \) and its translation \(\mathscr {G}' = \mathscr {G}+ \mathbf {t}\). We state the following result.

Proposition 9

The group \(\mathscr {G}\) is a rank two lattice if and only if the rotation matrix \(\mathbf {R}\) is Eisenstein rational.

Proof

First, we note that the density properties of the underlying group is not affected by affine transformations, i.e. a lattice (resp. dense group) is transformed into another lattice (resp. dense group). Here we consider \(\mathbf {X} = \left[ \varvec{\epsilon }_1 \;|\;\varvec{\epsilon }_2 \right] ^{-1}\) so that \(\{\mathbf {X}\varvec{\kappa }\;|\;\varvec{\kappa }\in \varLambda \} = \mathbb {Z}^2\). Then we obtain

$$\begin{aligned} \check{\mathbf {R}} = \mathbf {X} \mathbf {R}\mathbf {X}^{-1} = \mathbf {X} \left[ \begin{array}{cc} \frac{2 a - b}{2 c} &{} -\frac{\sqrt{3} b}{2 c} \\ \frac{\sqrt{3} b}{2 c} &{} \frac{2 a - b}{2 c} \\ \end{array} \right] \mathbf {X}^{-1} = \left[ \begin{array}{cc} \frac{a}{c} &{} -\frac{b}{c} \\ \frac{b}{c} &{} \frac{a - b}{c} \\ \end{array} \right] , \end{aligned}$$
(3)

and study \(\check{\mathscr {G}} = \check{\mathbf {R}}\mathbb {Z}\left( {\begin{matrix} 1 \\ 0 \end{matrix}} \right) \oplus \check{\mathbf {R}}\mathbb {Z}\left( {\begin{matrix} 0 \\ 1 \end{matrix}} \right) \oplus \mathbb {Z}\left( {\begin{matrix} 1 \\ 0 \end{matrix}} \right) \oplus \mathbb {Z}\left( {\begin{matrix} 0 \\ 1 \end{matrix}} \right) \), instead of \(\mathscr {G}\).

The generators of \(\check{\mathscr {G}}\) are given by the columns of the rational matrix \(\mathbf {B} = \left[ \check{\mathbf {R}} \;|\;\mathbf {I}_{2} \right] \) where \(\mathbf {I}_{2}\) stands for the \(2 \times 2\) identity matrix. As \(\mathbf {B}\) is a rational, full row rank matrix, it can be brought to its Hermite normal form \(\mathbf {H} = [\mathbf {T}\;|\;\mathbf {0}_{2,2}]\). The problem of computing the Hermite normal form \(\mathbf {H}\) of the rational matrix \(\mathbf {B}\) reduces to that of computing the Hermite normal form of an integer matrix: \(c \in \mathbb {Z}\) is the least common multiple of all the denominators of \(\mathbf {B}\); compute the Hermite normal form \(\mathbf {H}'\) for the integer matrix \(c \mathbf {B}\); finally, the Hermite normal form \(\mathbf {H}\) of \(\mathbf {B}\) is obtained by \(c^{-1} \mathbf {H}'\). The columns of \(\mathbf {H}\) are the minimal generators of \(\check{\mathscr {G}}\). Since the rank of \(\mathbf {B}\) is equal to 2, \(\mathbf {H}\) gives a base \((\pmb {\sigma }, \pmb {\phi })\), so that \(\check{\mathscr {G}} = \mathbb {Z}\pmb {\sigma } \oplus \mathbb {Z}\pmb {\phi }\). As \(\mathbf {H}'\) gives an integer base, \(c \check{\mathscr {G}}\) is an integer lattice. Finally, \(\mathscr {G}= \mathbb {Z}\mathbf {X}^{-1}\pmb {\sigma } \oplus \mathbb {Z}\mathbf {X}^{-1}\pmb {\phi }\).

Conversely, let us prove that \(\mathscr {G}\) is dense if (abc) is not an Eisenstein primitive triple (up to scaling). Again, we consider instead \(\check{\mathbf {R}} = [\pmb {b}_1 \mid \pmb {b}_2]\), and prove that for any \(\varepsilon > 0\) there exists \(\pmb {e},\pmb {e}' \in \check{\mathscr {G}}\), linearly independent, such that \(\Vert \pmb {e} \Vert < \varepsilon \), \(\Vert \pmb {e}' \Vert < \varepsilon \). Let \(\{.\}\) stand for the fractional part function. We study the images of \(\{\mathbb {Z}\pmb {b}_1\} \in [-1/2, 1/2)^2\), where \(\pmb {b}_1 = \left( {\begin{matrix} a/c \\ b/c \end{matrix}} \right) \) denotes the first column of \(\check{\mathbf {R}}\). If \(\pmb {b}_1\) contains irrational elements, the \(\{\mathbb {Z}\pmb {b}_1\}\) contains infinitely many distinct points. By compactness of \([-1/2, 1/2]^2\), we can extract a subsequence \((\{n_k \pmb {b}_1\})_{k \in \mathbb {N}}\), converging to some point in \([-1/2, 1/2]^2\). Thus \(\{(n_{k+1} - n_{k}) \pmb {b}_1\} = \{n_{k+1} \pmb {b}_1 \} - \{ n_{k} \pmb {b}_1\}\) converges to (0, 0). In particular, we can find integers mpq, where \(m=n_{k+1}-n_k\) for k large enough, such that \(\pmb {e} = m \pmb {b}_1 + (p,q) \in \check{\mathscr {G}}\) has norm smaller than \(\frac{\varepsilon }{3}\). Note now that the second column of \(\check{\mathbf {R}}\) satisfies \(\pmb {b}_2 = \left[ {\begin{matrix} 0 &{} -1 \\ 1 &{} -1 \\ \end{matrix}} \right] \pmb {b}_1\). Then we claim that \(\pmb {e}' = \left[ {\begin{matrix} 0 &{} -1 \\ 1 &{} -1 \\ \end{matrix}} \right] \pmb {e} = m \pmb {b}_2 + (-q,p-q)\) also lies in \(\check{\mathscr {G}}\), has norm less than \(3 \Vert \pmb {e} \Vert \) (hence less than \(\varepsilon \)) and is linearly independent from \(\pmb {e}\) (the matrix \(\check{\mathbf {R}}\) has no eigenvectors).

Consequently, \(\pmb {b}_1\) has rational coefficients, and we may take abc integers with \(\gcd \) equal to 1. Since \(\cos \theta = \frac{2 a - b}{c}\) and \(\sin \theta = \frac{\sqrt{3} b}{2 c}\), we conclude that these form an Eisenstein primitive triple.    \(\square \)

In the next section, we focus on a subgroup of \(\mathscr {G}\) obtained from the intersection with the remainder range, i.e. \(\bar{\mathscr {G}} = \mathscr {G}/\varLambda \) and its translation by \(\mathbf {t}\) (modulo \(\varLambda \)).

Corollary 10

If \(\cos \theta = \frac{2 a - b}{2 c}\) and \(\sin \theta = \frac{\sqrt{3} b}{2 c}\) where (abc) is a primitive Eisenstein triple, the group \(\bar{\mathscr {G}} = \mathscr {G}/\varLambda \) is cyclic and \(|\bar{\mathscr {G}}| = c\).

Proof

Up to the affine transformation of (3), we may consider the quotient group \(\ddot{\mathscr {G}} = \check{\mathscr {G}}/\mathbb {Z}^2\) and we note that for a primitive Eisenstein triple (abc), any two integers in the triple are coprime [12, p. 12]. Let us first give a characterization of \(\ddot{\mathscr {G}}\). From the proof of Proposition 9, we know that any element \(\mathbf {x}\in \check{\mathscr {G}}\) is a rational vector of the form \((\frac{q_1}{c},\frac{q_2}{c})\). By definition, \(\{ \mathbf {x}\} \in \ddot{\mathscr {G}}\) iff there exist \(n, m \in \mathbb {Z}\) such that \(\{x\} = \{n \pmb {b}_1 + m \pmb {b}_2\}\), i.e. there exist integers nmuv such that

$$\begin{aligned} \left\{ \begin{array}{ll} \frac{q_1}{c} + u = n \frac{a}{c} - m \frac{b}{c}, \\ \frac{q_2}{c} + v = n \frac{b}{c} + m \frac{a-b}{c} \end{array} \right. \; \text { or, equivalently, } \; \left\{ \begin{array}{ll} q_1 + u c = an - bm, \\ q_2 + v c = b n + a m - bm \, . \end{array} \right. \end{aligned}$$

A linear combination of both lines yields directly \(b q_1 - a q_2 = c (-c m - b u + a v)\), hence \(b q_1 - a q_2 \equiv 0 \pmod {c}\) is a necessary condition. It is also sufficient. Indeed, let us suppose that \(b q_1 - a q_2 = k c\), \(k \in \mathbb {Z}\).

Then, since \(\gcd (a,b) = 1\), we know that the solutions to this Diophantine equation are of the form \((q_1,q_2) = \ell (a,b) + k c (\beta ,-\alpha )\), where \(\alpha a + \beta b = 1\) (Bézout identity) and \(\ell \in \mathbb {Z}\). Consequently, \((\frac{q_1}{c},\frac{q_2}{c}) = \ell \pmb {b}_1 + (k \beta , - k \alpha )\) lies in \(\check{\mathscr {G}}\).

Moreover, we deduce that \(\ddot{\mathscr {G}}\) is cyclic with generator \(\pmb {b}_1\). Finally, \(\{ \ell \pmb {b}_1 \} = (0,0)\) implies \(\ell a = u c\) and \(\ell b = v c\) for some integers uv. Applying the Gauss’ lemma to coprimes ac, we see that \(\ell \) needs to be a multiple of c. Therefore \(|\ddot{\mathscr {G}}| = c\).    \(\square \)

5 Non-injective Digitized Rigid Motions

5.1 Non-injective Frames of the Remainder Range

In Remark 2, we observed that some frames of the remainder range correspond to neighborhood motion maps which exhibit non-injectivity of the corresponding digitized rigid motion. The set of all the neighborhood motion maps \(\mathbb {M}_1\), presented in Appendix, allows us to identify such non-injective zones i.e., unions of frames of the remainder range. For instance, the frames related to the neighborhood motion maps of the axial coordinates; \((-2,4), (-1,4)\) and (0, 3) (see Fig. 6(top)), constitute a case of such a non-injective zone for rotation angles in \((\alpha _0, \alpha _1)\). Based on this observation, we can characterize the non-injectivity of a digitized rigid motion by the presence of \(\rho (\varvec{\kappa })\) in these specific zones (illustrated in Fig. 4(a)).

Conjecture 11

Let \(C_6\) stand for the 6-fold discrete rotation symmetry group. Given \(\varvec{\mathcal {U}}\in \mathbb {U}\) and \(\varvec{\kappa }\in \varLambda \), \(U(\varvec{\kappa })\), has two preimages \(\varvec{\kappa }\) and \(\varvec{\kappa }+ \varvec{\delta }\) where \(\varvec{\delta }\in \mathcal {N}_1(\varvec{\kappa })\) iff \(\rho (\varvec{\kappa })\) is in one of the zones \(c_k(\mathcal {F}), c_k \in C_6\), where \(\mathcal {F}\) is the parallelogram region whose vertices are: \(\left( \cos \theta - 1,\frac{\cos \theta }{\sqrt{3}}\right) , \left( 0,\frac{1}{\sqrt{3}}\right) \) \(, \big (\frac{1}{2} \left( 2 - \cos \theta - \sqrt{3} \sin \theta \right) , \frac{1}{6} \left( \sqrt{3} \cos \theta + 3 \sin \theta \right) \big ), \) \( \big (\frac{1}{2} \left( \cos \theta - \sqrt{3} \sin \theta \right) , \frac{1}{6} \left( 3 \sin (\theta )+3 \sqrt{3} \cos (\theta )-2 \sqrt{3}\right) \big )\).

5.2 Non-injective Digitized Rigid Motions in Square and Hexagonal Grids

In this section, we compare the loss of information induced by rigid motions on the square and the hexagonal grids. Indeed, we aim to determine on which type of grid digitized rigid motions preserve more information.

In accordance with the discussion in Sect. 4 and the similar discussion for the square grid in [1, 13], the density of images of the remainder map in the non-injective zones is related to the cardinality and the structure of \(\bar{\mathscr {G}}\). On the one hand, when \(\bar{\mathscr {G}}\) is dense, it is considered as the ratio between the area of the union of all the non-injective zones \(\bigcup \limits _{k=1,\dots ,6} c_k(\mathcal {F})\), and the area of the remainder range [13]. On the other hand, when \(\bar{\mathscr {G}}\) forms a lattice, it is estimated as \(\frac{|\bar{\mathscr {G}} \cap (\bigcup c_k(\mathcal {F}))|}{c}, k =1, \dots , 6\), where c is an element of a primitive Eisenstein (resp. Pythagorean) triple, i.e. \(|\bar{\mathscr {G}}|\) [13].

Fig. 5.
figure 5

Comparison of the loss of information induced by digitized rigid motions on the hexagonal and the square grids. The red and blue curves correspond to the ratios between the areas of non-injective zones and the remainder range for the square and the hexagonal grids, respectively. The “x” (resp. “o”) markers correspond to the values of the information loss rate \(1 - \frac{|U(S_Z)|}{|S_Z|}\) (resp. \(1 - \frac{|U(S_L)|}{|S_L|}\))

Nevertheless, to facilitate our study, we will consider the former ratio between the areas as an approximation of the information loss measure. Indeed, the rotations induced by primitive Eisenstein (resp. Pythagorean) triples are dense; one can always find a relatively near rotation angle such that c is relatively high. The area-ratio density measure can be then seen as a limit for the cardinality based ratio. Figure 5 presents the analytical curves of the area ratios for the hexagonal and the square grids with respect to rotation angles.

In order to validate this approximation, we also measure the loss of points for different sampled rotations and the following finite sets \(S_L =\varLambda \cap [-100,100]^2\) (resp. \(S_Z =\mathbb {Z}^2 \cap [-100,100]^2\)) in the hexagonal (resp. square) grid. In this setting, we use \(1 - \frac{|U(S_L)|}{|S_L|}\) (resp. \(1 - \frac{|U(S_Z)|}{|S_Z|}\)) as the measure. They are plotted as well in Fig. 5. We note that the experimental results follow the area-ratio measure that provides consequently a good approximationFootnote 1. The obtained results allow us to conclude that digitized rigid motions on the hexagonal grid preserve more information than their counterparts defined on the square grid.

6 Conclusion

In this article, we have extended the framework of neighborhood motion maps to rigid motions defined on the hexagonal grid—previously proposed for digitized rigid motions defined on \(\mathbb {Z}^2\) [8, 10]. Then, we studied the density of images of the remainder map and the structure of the induced groups. Finally, we have shown that the loss of information induced by digitization of rigid motions on the hexagonal grid is relatively low, in comparison with those on the square grid.

Our main perspective is to use the proposed framework for studying bijective digitized rigid motions and geometric and topological alterations induced by digitized rigid motions on the hexagonal grid.

Following a paradigm of reproducible research, the source code of the tool designed for studying neighborhood motion maps on the hexagonal grids is provided at the following URL: https://github.com/copyme/NeighborhoodMotionMapsTools