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

In this paper, we consider the dynamical behaviour of the discretizations of (linear) isometries of a real and finite dimensional vector space \(\mathbf {R}^n\). The goal is to understand how it is possible to rotate a numerical image (made of pixels) with the smallest loss of quality as possible. For example, in Fig. 1, we have applied 10 successive random rotations to a \(220\times 282\) pixels picture, using the software Gimp (linear interpolation algorithm). These discretized rotations induce a very strong blur in the resulting image.

Here, we consider the simplest algorithm that can be used to perform a discrete rotation: discretizing the rotation. More precisely, if \(x\in \mathbf {Z}^2\) is a integer point (representing a pixel), then the image of x by the discretization of a rotation R will be the integer point which is the closest of R(x). More precisely, in the general case of isometries we will use the following definition of a discretization.

Definition 1

We define the projection \(p : \mathbf {R}\rightarrow \mathbf {Z}\) such that for every \(x\in \mathbf {R}\), p(x) is the unique integer \(k\in \mathbf {Z}\) such that \(k-1/2 < x \le k + 1/2\) (in other words, \(p(x) = \left\lfloor x+11/2 \right\rfloor \)). This projection induces the map

$$ \begin{array}{rrcl} \pi : &{} \mathbf {R}^n &{} \longmapsto &{} \mathbf {Z}^n\\ &{} (x_i)_{1\le i\le n} &{} \longmapsto &{} \big (p(x_i)\big )_{1\le i\le n} \end{array} $$

which is an Euclidean projection on the lattice \(\mathbf {Z}^n\). For \(P\in O_n(\mathbf {R})\) (the set of linear isometries of \(\mathbf {R}^n\)), we denote by \(\widehat{P}\) the discretization of P, defined by

$$ \begin{array}{rrcl} \widehat{P} : &{} \mathbf {Z}^n &{} \longrightarrow &{} \mathbf {Z}^n\\ &{} x &{} \longmapsto &{} \pi (Px). \end{array} $$

We will measure the loss of information induced by the action of discretizing by the density of the image set. More precisely, given a sequence \((P_k)_{k\ge 1}\) of linear isometries of \(\mathbf {R}^n\), we will look for the density of the set \(\varGamma _k = (\widehat{P_k}\circ \cdots \circ \widehat{P_1})(\mathbf {Z}^n)\).

Definition 2

For \(A_1,\cdots ,A_k \in O_n(\mathbf {R})\), the rate of injectivity in time k of this sequence is the quantity

$$ \tau ^k(P_1,\cdots ,P_k) = \limsup _{R\rightarrow +\infty } \frac{{\text {Card}}\big ((\widehat{P_k}\circ \cdots \circ \widehat{P_1})(\mathbf {Z}^n)\cap [B_R]\big )}{{\text {Card}}[B_R]}\in ]0,1], $$

where \(B_R\) denotes the infinite ball of radius R centered at 0 and \([B_R]\) the set of integral points (i.e. with integer coordinates) inside \(B_R\). For an infinite sequence \((P_k)_{k\ge 1}\) of isometries, as the previous quantity is decreasing, we can define the asymptotic rate of injectivity

$$\begin{aligned} \tau ^\infty \big ((P_k)_{k\ge 1}\big ) = \lim _{k\rightarrow +\infty }\tau ^k(P_1,\cdots ,P_k)\in [0,1]. \end{aligned}$$

An example of the sets \(\varGamma _k\) for a random draw of isometries \(P_m\) is presented on Fig. 2. In particular, we observe that the density of these sets seems to decrease when k goes to infinity: the images get whiter and whiter.

Fig. 1.
figure 1

Original image (left) of size \(220\times 282\) and 10 successive random rotations of this image (right), obtained with the software Gimp (linear interpolation algorithm).

Fig. 2.
figure 2

Successive images of \(\mathbf {Z}^2\) by discretizations of random rotations, a point is black if it belongs to \((\widehat{R_{\theta _k}}\circ \cdots \circ \widehat{R_{\theta _1}})(\mathbf {Z}^2)\), where the \(\theta _i\) are chosen uniformly randomly in \([0,2\pi ]\). From left to right and top to bottom, \(k=2,\, 5,\, 50\).

This phenomenon is confirmed when we plot the density of the intersection between these image sets \(\varGamma _k\) and a big ball of \(\mathbf {R}^n\) (see Fig. 3): this density seems to tend to 0 as the time k goes to infinity.

Fig. 3.
figure 3

Expectation of the rate of injectivity of a random sequences of rotations: the graphic represents the mean of the rate of injectivity \(\tau ^k(R_{\theta _k},\cdots ,R_{\theta _1})\) depending on k, \(1\le k\le 200\), for 50 random draws of sequences of angles \((\theta _i)_i\), with each \(\theta _i\) chosen independently and uniformly in \([0,2\pi ]\). Note that the behaviour is not exponential.

We would like to explain theoretically this phenomenon. Of course, if we take \(P_m = {\text {Id}}\), then we will have \(\varGamma _k = \mathbf {Z}^n\) and the rates of injectivity will be equal to 0. To avoid this kind of “exceptional cases”, we will study the asymptotic rate of injectivity of a generic sequence of matrices of \(O_n(\mathbf {R})\), in the following sense.

Definition 3

We fix once for all a norm \(\Vert \cdot \Vert \) on \(M_n(\mathbf {R})\). For any sequence \((P_k)_{k\ge 1}\) of matrices of \(O_n(\mathbf {R})\), we set

$$ \Vert (P_k)_k\Vert _\infty = \sup _{k\ge 1} \Vert P_k\Vert . $$

In other words, we consider the space \(\ell ^\infty (O_n(\mathbf {R}))\) of uniformly bounded sequences of linear isometries endowed with this natural metric.

This metric is complete, thus there is a good notion of genericity on the set of linear isometries: a set \(\mathcal U\subset (O_n(\mathbf {R}))^\mathbf {N}\) is generic if it is a countable intersection of open and dense subsets of \(\ell ^\infty (O_n(\mathbf {R}))\). The main theorem of this paper studies the asymptotic rate of injectivity in this context.

Theorem 1

Let \((P_k)_{k\ge 1}\) be a generic sequence of matrices of \(O_n(\mathbf {R})\). Then \(\tau ^\infty ((P_k)_k) = 0\).

The proof of this theorem will even show that for every \(\varepsilon >0\), there exists an open and dense subset of \(\ell ^\infty (O_n(\mathbf {R}))\) on which \(\tau ^\infty \) is smaller than \(\varepsilon \). This theorem expresses that for “most of” the sequences of isometries, the loss of information is total. Thus, for a generic sequence of rotations, with the naive algorithm of discretization, we will not be able to avoid the blur observed in Fig. 1.

Note that we do not know what is the rate of injectivity of a sequence of isometries made of independent identically distributed random draws (for example with respect to the Haar measure on \(O_n(\mathbf {R})\)).

The proof of Theorem 1 will be the occasion to study the structure of the image sets \(\varGamma _k = (\widehat{P_k}\circ \cdots \circ \widehat{P_1})(\mathbf {Z}^n)\). It appears that there is a kind of “regularity at infinity” in \(\varGamma _k\). More precisely, this set is an almost periodic pattern: roughly speaking, for R large enough, the set \(\varGamma _k \cap B_R\) determines the whole set \(\varGamma _k\) up to an error of density smaller than \(\varepsilon \) (see Definition 6). We prove that the image of an almost periodic pattern by the discretization of a linear map is still an almost periodic pattern (Theorem 2); thus, the sets \(\varGamma _k\) are almost periodic patterns.

The idea of the proof of Theorem 1 is to take advantage of the fact that for a generic sequence of isometries, we have a kind of independence of the coefficients of the matrices. Thus, for a generic isometry \(P\in O_n(\mathbf {R})\), the set \(P(\mathbf {Z}^n)\) is uniformly distributed modulo \(\mathbf {Z}^n\). We then remark that the local pattern of the image set \(\widehat{P}(\mathbf {Z}^n)\) around \(\widehat{P}(x)\) is only determined by P and the remainder of Px modulo \(\mathbf {Z}^n\): the global behaviour of \(\widehat{P}(\mathbf {Z}^n)\) is coded by the quotient \(\mathbf {R}^n/\mathbf {Z}^n\). This somehow reduces the study to a local problem.

As a first application of this remark, we state that the rate of injectivity in time 1 can be seen as the area of an intersection of cubes (Proposition 2). This observation is one of the two keys of the proof of Theorem 1, the second one being the study of the action of the discretizations \(\widehat{P}\) on the frequencies of differences \(\rho _{\varGamma _k}(v) = D\big (({\varGamma _k}-v)\cap {\varGamma _k}\big )\). Indeed, if there exists a set \(\varGamma '\subset \varGamma \) of positive density, together with a vector v such that for every \(x\in \varGamma '\), we have \(\widehat{P}(x) = \widehat{P}(x+v)\), then we will have \(D(\widehat{P}(\varGamma )) \le D(\widehat{P})-D(\varGamma ')\). This study of the frequencies of differences will include a Minkowski-type theorem for almost-periodic patterns (Theorem 4).

The particular problem of the discretization of linear maps has been quite little studied. To our knowledge, what has been made in this direction has been initiated by image processing. One wants to avoid phenomenons like loss of information (due to the fact that discretizations of linear maps are not injective) or aliasing (the apparition of undesirable periodic patterns in the image, due for example to a resonance between a periodic pattern in the image and the discretized map). To our knowledge, the existing studies are mostly interested in the linear maps with rational coefficients (see for example [8, 11] or [9]), including the specific case of rotations (see for example [1, 2, 1214]). These works mainly focus on the local behaviour of the images of \(\mathbf {Z}^2\) by discretizations of linear maps: given a radius R, what pattern can follow the intersection of this set with any ball of radius R? What is the number of such patterns, what are their frequencies? Are they complex (in a sense to define) or not? Are these maps bijections? In particular, the thesis [12] of B. Nouvel gives a characterization of the angles for which the discrete rotation is a bijection (such angles are countable and accumulate only on 0). Our result complements that of B. Nouvel: on the one hand it expresses that a generic sequence of discretizations is far from being a bijection, and on the other hand this remains true in any dimension.

Note that Theorem 1 will be generalized to the case of matrices of determinant 1 in [5], with more sophisticated techniques (see also [6]).

2 Almost Periodic Sets

In this section, we introduce the basic notions that we will use during the study of discretizations of isometries of \(\mathbf {R}^n\).

We fix once for all an integer \(n\ge 1\). We will denote by \(\llbracket a, b \rrbracket \) the integer segment \([a,b]\cap \mathbf {Z}\). In this part, every ball will be taken with respect to the infinite norm; in particular, for \(x = (x_1,\cdots ,x_n)\), we will have

$$\begin{aligned} B(x,R) = B_\infty (x,R) = \big \{y=(y_1,\cdots ,y_n)\in \mathbf {R}^n\mid \forall i\in \llbracket 1, n\rrbracket , |x_i-y_i|<R\big \}. \end{aligned}$$

We will also denote \(B_R = B(0,R)\). Finally, we will denote by \(\lfloor x \rfloor \) the biggest integer that is smaller than x and \(\lceil x \rceil \) the smallest integer that is bigger than x. For a set \(B\subset \mathbf {R}^n\), we will denote \([B] = B\cap \mathbf {Z}^n\).

2.1 Almost Periodic Patterns: Definitions and First Properties

In this subsection, we define the notion of almost periodic pattern and prove that these sets possess a uniform density.

Definition 4

Let \(\varGamma \) be a subset of \(\mathbf {R}^n\).

  • We say that \(\varGamma \) is relatively dense if there exists \(R_\varGamma >0\) such that each ball with radius at least \(R_\varGamma \) contains at least one point of \(\varGamma \).

  • We say that \(\varGamma \) is a uniformly discrete if there exists \(r_\varGamma >0\) such that each ball with radius at most \(r_\varGamma \) contains at most one point of \(\varGamma \).

The set \(\varGamma \) is called a Delone set (see for instance [10]) if it is both relatively dense and uniformly discrete.

Definition 5

For a discrete set \(\varGamma \subset \mathbf {R}^n\) and \(R\ge 1\), we define the uniform R-density:

$$\begin{aligned} D_R^+(\varGamma ) = \sup _{x\in \mathbf {R}^n} \frac{{\text {Card}}\big (B(x,R)\cap \varGamma \big )}{{\text {Card}}\big (B(x,R)\cap \mathbf {Z}^n\big )}, \end{aligned}$$
(1)

and the uniform upper density:

$$\begin{aligned} D^+(\varGamma ) = \limsup _{R\rightarrow +\infty } D_R^+(\varGamma ). \end{aligned}$$
(2)

Remark that if \(\varGamma \subset \mathbf {R}^n\) is Delone for the parameters \(r_\varGamma \) and \(R_\varGamma \), then its upper density satisfies:

$$ \frac{1}{(2R_\varGamma +1)^n} \le D^+(\varGamma ) \le \frac{1}{(2r_\varGamma +1)^n}. $$

We can now define the notion of almost periodic pattern that we will use throughout this paper. Roughly speaking, an almost periodic pattern \(\varGamma \) is a set for which there exists a relatively dense set of translations of \(\varGamma \), where a vector v is a translation of \(\varGamma \) if \(\varGamma -v\) is equal to \(\varGamma \) up to a set of upper density smaller than \(\varepsilon \). More precisely, we state the following definition.

Definition 6

A Delone set \(\varGamma \subset \mathbf {Z}^n\) is an almost periodic pattern if for every \(\varepsilon >0\), there exists \(R_\varepsilon >0\) and a relatively dense set \(\mathcal N_\varepsilon \), called the set of \(\varepsilon \) -translations of \(\varGamma \), such that

$$\begin{aligned} \forall R\ge R_\varepsilon ,\ \forall v\in \mathcal N_\varepsilon ,\ D_R^+\big ( (\varGamma +v)\varDelta \varGamma \big ) <\varepsilon . \end{aligned}$$
(3)

Of course, every lattice, or every finite union of translates of a given lattice, is an almost periodic pattern. We will see in next subsection a large class of examples of almost periodic patterns: images of \(\mathbf {Z}^n\) by discretizations of linear maps.

We end this introduction to almost periodic patterns by stating that the notion of almost periodic pattern is invariant under discretizations of linear isometries: the image of an almost periodic pattern by the discretization of a linear isometry is still an almost periodic pattern.

Theorem 2

Let \(\varGamma \subset \mathbf {Z}^n\) be an almost periodic pattern and \(P\in O_n(\mathbf {R})\). Then the set \(\widehat{P}(\varGamma )\) is an almost periodic pattern.

This implies that, given a sequence \((P_k)_{k\ge 1}\) of isometries of \(\mathbf {R}^n\), the successive images \((\widehat{P_k}\circ \cdots \circ \widehat{P_1})(\mathbf {Z}^n)\) are almost periodic patterns. See Fig. 2 for an example of the successive images of \(\mathbf {Z}^2\) by a random sequence of bounded matrices of \(O_2(\mathbf {R})\). The proof of Theorem 2 will be done in Appendix B. Examples of sets \(\widehat{P}(\mathbf {Z}^2)\) for various rotations P can be found in Fig. 4, where the almost periodicity is patent. Remark that Theorem 2 implies that the limsup in Eq. (2) is in fact a limit, which remains the same if in Eq. (1) we consider an inf instead of a sup (see [7]).

Fig. 4.
figure 4

Images of \(\mathbf {Z}^2\) by discretizations of rotations, a point is black if it belongs to the image of \(\mathbf {Z}^2\) by the discretization of the rotation. From left to right and top to bottom, angles \(\pi /4\), \(\pi /5\) and \(\pi /6\).

2.2 Differences in Almost Periodic Patterns

We will need to understand how behave the differences in an almost periodic pattern \(\varGamma \), i.e. the vectors \(x-y\) with \(x,y\in \varGamma \). In fact, we will study the frequency of appearance of these differences.

Definition 7

For \(v\in \mathbf {Z}^n\), we set

$$\begin{aligned} \rho _\varGamma (v) = \frac{D\{x\in \varGamma \mid x+v\in \varGamma \}}{D(\varGamma )} = \frac{D\big (\varGamma \cap (\varGamma -v)\big )}{D(\varGamma )} \in [0,1] \end{aligned}$$

the frequency of the difference v in the almost periodic pattern \(\varGamma \).

Studying frequencies of differences allows to focus on the global behaviour of an almost periodic set. The function \(\rho _\varGamma \) is itself almost periodic in the sense given by H. Bohr (see [3]).

Definition 8

Let \(f : \mathbf {Z}^n\rightarrow \mathbf {R}\). Denoting by \(T_v\) the translation of vector v, we say that f is Bohr almost periodic (also called uniformly almost periodic) if for every \(\varepsilon >0\), the set

$$\begin{aligned} \mathcal N_\varepsilon = \big \{v\in \mathbf {Z}^n\mid \Vert f - f\circ T_v \Vert _\infty <\varepsilon \big \}, \end{aligned}$$

is relatively dense.

If \(f: \mathbf {Z}^n\rightarrow \mathbf {R}\) is a Bohr almost periodic function, then it possesses a mean \(\mathcal M(f)\) (see for example the historical paper of H. Bohr [3, Satz VIII]), which satisfies: for every \(\varepsilon >0\), there exists \(R_0>0\) such that for every \(R\ge R_0\) and every \(x\in \mathbf {R}^n\), we have

$$\begin{aligned} \left| \mathcal M(f) - \frac{1}{{\text {Card}}[B(x,R)]}\sum _{v\in [B(x,R)]} f(v) \right| <\varepsilon . \end{aligned}$$

The fact that \(\rho _\varGamma \) is Bohr almost periodic is straightforward.

Lemma 1

If \(\varGamma \) is an almost periodic pattern, then the function \(\rho _\varGamma \) is Bohr almost periodic.

In fact, we can compute precisely the mean of \(\rho (\varGamma )\).

Proposition 1

If \(\varGamma \) is an almost periodic pattern, then we have

$$ \mathcal M (\rho _\varGamma ) = D(\varGamma ). $$

The proof of this proposition will be done in Appendix A.

We now state a Minkowski-type theorem for the map \(\rho _\varGamma \). To begin with, we recall the classical Minkowski theorem (see for example the book [4]).

Theorem 3

(Minkowski). Let \(\varLambda \) be a lattice of \(\mathbf {R}^n\), \(k\in \mathbf {N}\) and \(S\subset \mathbf {R}^n\) be a centrally symmetric convex body. If \({\text {Leb}}(S/2) > k\, {\text {covol}}(\varLambda )\), then S contains at least 2k distinct points of \(\varLambda {\setminus }\{0\}\).

Theorem 4

Let \(\varGamma \subset \mathbf {Z}^n\) be an almost periodic pattern of density \(D(\varGamma )\). Let S be a centrally symmetric body, with \({\text {Leb}}(S)> 4^nk\). If for every \(v\in S\cap \mathbf {Z}^n\), we have \(\rho _\varGamma (v)<\rho _0\), then

$$ \rho _0\ge \frac{1}{k}\left( 1-\frac{1}{D(\varGamma )(2k+1)}\right) . $$

In particular, if \(k\ge \frac{1}{D(\varGamma )}\), then there exists \(x\in C\cap \mathbf {Z}^n\) such that \(\rho _\varGamma (x)\ge \frac{D(\varGamma )}{2}\).

Proof

(of Theorem 4 ). Minkowski theorem (Theorem 3) asserts that S / 2 contains at least \(2k+1\) distinct points of \(\mathbf {Z}^n\), denoted by \(u^i\). By the hypothesis on the value of \(\rho _\varGamma \) on S, and because the set of differences of S / 2 is included in S, we know that the density of \((\varGamma + u^i)\cap (\varGamma +u^j)\) is smaller than \(\rho _0 D(\varGamma )\). Thus,

$$\begin{aligned} D\Big (\bigcup _i (\varGamma +u^i)\Big )&\ge \sum _i D(\varGamma ) - \sum _{i<j} D\big ((\varGamma + u^i)\cap (\varGamma +u^j)\big )\\&\ge (2k+1)D(\varGamma ) - \frac{2k(2k+1)}{2}\rho _0 D(\varGamma ). \end{aligned}$$

The theorem then follows from the fact that the left member of this inequality is smaller than 1.    \(\square \)

3 Rate of Injectivity of Isometries

We now focus in more detail on the rate of injectivity of a sequence of isometries (see Definition 2).

3.1 A Geometric Viewpoint on the Rate of Injectivity

In this subsection, we present a geometric construction to compute the rate of injectivity of a generic matrix, and some applications of it.

Let \(P\in O_n(\mathbf {R})\) and \(\varLambda = P(\mathbf {Z}^n)\). The density of \(\pi (\varLambda )\) is the proportion of \(x\in \mathbf {Z}^n\) belonging to \(\pi (\varLambda )\); in other words the proportion of \(x\in \mathbf {Z}^n\) such that there exists \(\lambda \in \varLambda \) whose distance to x (for \(\Vert \cdot \Vert _\infty \)) is smaller than 1 / 2. remark that this property only depends on the value of x modulo \(\varLambda \). If we consider the union

$$\begin{aligned} U = \bigcup _{\lambda \in \varLambda } B(\lambda ,1/2) \end{aligned}$$

of balls of radius 1 / 2 centred on the points of \(\varLambda \) (see Fig. 5), then \(x\in \pi (\varLambda )\) if and only if \(x\in U\cap \mathbf {Z}^n\). So, if we set \(\nu \) the measure of repartition of the \(x\in \mathbf {Z}^n\) modulo \(\varLambda \), that is

$$ \nu = \lim _{R\rightarrow +\infty } \frac{1}{{\text {Card}}(B_R\cap \mathbf {Z}^n)} \sum _{x\in B_R\cap \mathbf {Z}^n} \delta _{{\text {pr}}_{\mathbf {R}^n/\varLambda }(x)}, $$

then we obtain the following formula.

Proposition 2

For every \(P\in O_n(\mathbf {R})\) (we identify U with its projection of \(\mathbf {R}^n/\varLambda \)),

$$ \tau (P) = D\big (\pi (\varLambda )\big ) = \nu \big ({\text {pr}}_{\mathbf {R}^n/\varLambda }(U)\big ). $$

An even more simple formula holds when the matrix P is totally irrational.

Definition 9

We say that a matrix \(P\in O_n(\mathbf {R})\) is totally irrational if the image \(P(\mathbf {Z}^n)\) is equidistributedFootnote 1 modulo \(\mathbf {Z}^n\); in particular, this is true when the coefficients of P form a \(\mathbf {Q}\)-free family.

If the matrix P is totally irrational, then the measure \(\nu \) is the uniform measure. Thus, if \(\mathcal D\) is a fundamental domain of \(\mathbf {R}^n/\varLambda \), then \(\tau (P)\) is the area of \(\mathcal D \cap U\). We call the area of \(\mathcal D \cap U\) the mean rate of injectivity of P and denote it by \(\overline{\tau }(P)\).

Fig. 5.
figure 5

Computation of the mean rate of injectivity of a rotation of \(\mathbf {R}^2\): it is equal to 1 minus the area of the interior of the red square (Color figure online).

Fig. 6.
figure 6

Mean rate of injectivity of a rotation of \(\mathbf {R}^2\) depending of the angle of the rotation.

With the same kind of arguments, we easily obtain a formula for \(\rho _{\widehat{P}(\mathbf {Z}^n)}(v)\) (the frequency of the difference v in \(\widehat{P}(\mathbf {Z}^n)\), see Definition 7).

Proposition 3

If \(P\in GL_n(\mathbf {R})\) is totally irrational, then for every \(v\in \mathbf {Z}^n\),

$$\begin{aligned} \rho _{\widehat{P}(\mathbf {Z}^n)}(v) = {\text {Leb}}\big ( B(v,1/2) \cap U\big ). \end{aligned}$$

Proof

(Sketch of proof of Proposition 3 ). We want to know which proportion of points \(x\in \varGamma = \widehat{P}(\mathbf {Z}^n)\) are such that \(x+v\) also belongs to \(\varGamma \). But modulo \(\varLambda = P(\mathbf {Z}^n)\), x belongs to \(\varGamma \) if and only if \(x\in B(0,1/2)\). Similarly, \(x+v\) belongs to \(\varGamma \) if and only if \(x\in B(-v,1/2)\). Thus, by equirepartition, \(\rho _{\widehat{P}(\mathbf {Z}^n)}(v)\) is equal to the area of \(B(v,1/2) \cap U\).    \(\square \)

From Proposition 2, we deduce the continuity of \(\overline{\tau }\). More precisely, \(\overline{\tau }\) is continuous and piecewise polynomial of degree smaller than n; moreover \(\tau \) coincides with a continuous function on a generic subset of \(O_n(\mathbf {R})\).

It also allows to compute simply the mean rate of injectivity of some examples of matrices: for \(\theta \in [0,\pi /2]\), the mean rate of injectivity of a rotation of \(\mathbf {R}^2\) of angle \(\theta \) is (see Figs. 5 and 6).

$$ \overline{\tau }(R_\theta ) = 1-(\cos (\theta )+\sin (\theta )-1)^2. $$

In particular, in the neighbourhoods of all the nontrivial angles on which the discrete rotation is bijective (see [12, 13]), most of the rotations have a rate of injectivity bounded away from 1.

3.2 Diffusion Process

In this paragraph, we study the action of a discretization of a matrix on the set of differences of an almost periodic pattern \(\varGamma \); more precisely, we study the link between the functions \(\rho _\varGamma \) and \(\rho _{\widehat{P}(\varGamma )}\).

For \(u\in \mathbf {R}^n\), we define the function \(\varphi _u\), which is a “weighted projection” of u on \(\mathbf {Z}^n\).

Definition 10

Given \(u\in \mathbf {R}^n\), the function \(\varphi _u = \mathbf {Z}^n\rightarrow [0,1]\) is defined by

$$\varphi _u (v) = \left\{ \begin{array}{ll} 0 &{} \ {if}\; d_\infty (u,v)\ge 1\\ \prod _{i=1}^n (1-|u_i+v_i|) &{} \ {if}\; d_\infty (u,v)< 1. \end{array}\right. $$
Fig. 7.
figure 7

The function \(\varphi _u\) in dimension 2: its value on one vertex of the square is equal to the area of the opposite rectangle; in particular, \(\varphi _u(v)\) is the area of the rectangle with the vertices u and \(v+(1,1)\) (in bold).

Fig. 8.
figure 8

The red vector is equal to that of Fig. 7 for \(u=Pv\). If Px belongs to the bottom left rectangle, then \(\pi (Px+Pv) = y\in \mathbf {Z}^2\); if Px belongs to the top left rectangle, then \(\pi (Px+Pv) = y+(0,1)\) etc. (Color figure online).

In particular, the function \(\varphi _u\) satisfies \(\sum _{v\in \mathbf {Z}^n} \varphi _u(v) = 1\), and is supported by the vertices of the integral unit cubeFootnote 2 that containsFootnote 3 u. Figure 7 gives a geometric interpretation of this function \(\varphi _u\).

The following property asserts that the discretization \(\widehat{P}\) acts “smoothly” on the frequency of differences. In particular, when \(D(\varGamma ) = D(\widehat{P} \varGamma )\), the function \(\rho _{\widehat{P} \varGamma }\) is obtained from the function \(\rho _\varGamma \) by applying a linear operator \(\mathcal A\), acting on each Dirac function \(\delta _v\) such that \(\mathcal A \delta _u(v) = \varphi _{P(u)}(v)\). Roughly speaking, to compute \(\mathcal A \delta _v\), we take \(\delta _{Pv}\) and apply a diffusion process. In the other case where \(D(\widehat{P} \varGamma ) < D(\varGamma )\), we only have inequalities involving the operator \(\mathcal A\) to compute the function \(\rho _{\widehat{P}\varGamma }\).

Proposition 4

Let \(\varGamma \subset \mathbf {Z}^n\) be an almost periodic pattern and \(P\in O_n(\mathbf {R})\) be a generic matrix.

  1. (i)

    If \(D(\widehat{P}(\varGamma )) = D(\varGamma )\), then for every \(u\in \mathbf {Z}^n\),

    $$ \rho _{\widehat{P}(\varGamma )}(u) = \sum _{v\in \mathbf {Z}^n} \varphi _{P(v)} (u) \rho _\varGamma (v). $$
  2. (ii)

    In the general case, for every \(u\in \mathbf {Z}^n\), we have

    $$ \frac{D(\varGamma )}{D(\widehat{P}(\varGamma ))}\sup _{v\in \mathbf {Z}^n} \varphi _{P(v)} (u) \rho _\varGamma (v) \le \rho _{\widehat{P}(\varGamma )}(u) \le \frac{D(\varGamma )}{D(\widehat{P}(\varGamma ))}\sum _{v\in \mathbf {Z}^n} \varphi _{P(v)} (u) \rho _\varGamma (v). $$

Proof

(of Proposition 4 ). We begin by proving the first point of the proposition. Suppose that \(P\in O_n(\mathbf {R})\) is generic and that \(D(\widehat{P}(\varGamma )) = D(\varGamma )\). Let \(x\in \varGamma \cap (\varGamma -v)\). We consider the projection \(y'\) of \(y=Px\), and the projection \(u'\) of \(u=Pv\), on the fundamental domain \(]-1/2,1/2]^n\) of \(\mathbf {R}^n/\mathbf {Z}^n\). We have

$$\begin{aligned} P(x+v) = \pi (Px) + \pi (Pv) + y' + u'. \end{aligned}$$

Suppose that \(y'\) belongs to the parallelepiped whose vertices are \((-1/2,\cdots ,-1/2)\) and \(u'\) (in bold in Fig. 8), then \(y'+u'\in [-1/2,1/2[^n\). Thus, \(\pi (P(x+v)) = \pi (Px) + \pi (Pv)\). The same kind of results holds for the other parallelepipeds whose vertices are \(u'\) and one vertex of \([-1/2,1/2[^n\).

We set \(\varGamma = \widehat{P}(\mathbf {Z}^n)\). The genericity of P ensures that for every \(v\in \mathbf {Z}^n\), the set \(\varGamma \cap (\varGamma -v)\), which has density \(D(\varGamma )\rho _\varGamma (v)\) (by definition of \(\rho _\varGamma \)), is equidistributed modulo \(\mathbf {Z}^n\) (by Lemma 4). Thus, the points \(x'\) are equidistributed modulo \(\mathbf {Z}^n\). In particular, the difference v will spread into the differences which are the support of the function \(\varphi _{Pv}\), and each of them will occur with a frequency given by \(\varphi _{Pv} (x) \rho _\varGamma (v)\). The hypothesis about the fact that the density of the sets does not decrease imply that the contributions of each difference of \(\varGamma \) to the differences of \(\widehat{P} (\varGamma )\) add.

In the general case, the contributions to each difference of \(\varGamma \) may overlap. However, applying the argument of the previous case, we can easily prove the second part of the proposition.    \(\square \)

Remark 1

We also remark that:

  1. (i)

    the density strictly decreases (that is, \(D(\widehat{P}(\varGamma )) < D(\varGamma )\)) if and only if there exists \(v_0\in \mathbf {Z}^n\) such that \(\rho _\varGamma (v_0)>0\) and \(\Vert Pv_0\Vert _\infty <1\);

  2. (ii)

    if there exists \(v_0\in \mathbf {Z}^n\) such that

    $$ \sum _{v\in \mathbf {Z}^n} \varphi _{P(v)} (v_0) \rho _\varGamma (v_0)>1, $$

    then the density strictly decreases by at least \(\sum _{v\in \mathbf {Z}^n} \varphi _{P(v)} (v_0) \rho _\varGamma (v_0)- 1\).

3.3 Rate of Injectivity of a Generic Sequence of Isometries

We now come to the proof of the main theorem of this paper (Theorem 1). We will begin by applying the Minkowski theorem for almost periodic patterns (Theorem 4), which gives one nonzero difference whose frequency is positive. The rest of the proof of Theorem 1 consists in using again an argument of equidistribution. More precisely, we apply successively the following lemma, which asserts that given an almost periodic pattern \(\varGamma \) of density \(D_0\), a sequence of isometries and \(\delta >0\), then, perturbing each isometry of at most \(\delta \) if necessary, we can make the density of the \(k_0\)-th image of \(\varGamma \) smaller than \(\lambda _0 D_0\), with \(k_0\) and \(\lambda _0\) depending only on \(D_0\) and \(\delta \). The proof of this lemma involves the study of the action of the discretizations on differences made in Proposition 4

Lemma 2

Let \((P_k)_{k\ge 1}\) be a sequence of matrices of \(O_n(\mathbf {R})\) and \(\varGamma \subset \mathbf {Z}^n\) an almost periodic pattern. Given \(\delta >0\) and \(D>0\) such that \(D(\varGamma )\ge D\), there exists \(k_0 = k_0(D)\) (decreasing in D), \(\lambda _0 = \lambda _0(D,\delta )<1\) (decreasing in D and in \(\delta \)), and a sequence \((Q_k)_{k\ge 1}\) of totally irrational matrices of \(O_n(\mathbf {R})\), such that \(\Vert P_k - Q_k\Vert \le \delta \) for every \(k\ge 1\) and

$$ D\big ((\widehat{Q_{k_0}}\circ \dots \circ \widehat{Q_1})(\varGamma )\big )< \lambda _0 D(\varGamma ). $$

We begin by proving that this lemma implies Theorem 1.

Proof

(of Theorem 1 ). Suppose that Lemma 2 is true. Let \(\tau _0\in ]0,1[\) and \(\delta >0\). We want to prove that we can perturb the sequence \((P_k)_k\) into a sequence \((Q_k)_k\) of isometries, which is \(\delta \)-close to \((P_k)_k\) and is such that its asymptotic rate is smaller than \(\tau _0\) (and that this remains true on a whole neighbourhood of these matrices).

Thus, we can suppose that \(\tau ^\infty ((P_k)_k)>\tau _0\). We apply Lemma 2 to obtain the parameters \(k_0 = k_0(\tau _0/2)\) (because \(k_0(D)\) is decreasing in D) and \(\lambda _0 = \lambda _0(\tau _0/2,\delta )\) (because \(\lambda _0(D,\delta )\) is decreasing in D). Applying the lemma \(\ell \) times, this gives a sequence \((Q_k)_k\) of isometries, which is \(\delta \)-close to \((P_k)_k\), such that, as long as \(\tau ^{\ell k_0}(Q_0,\cdots ,Q_{\ell k_0})> \tau _0/2\), we have \(\tau ^{\ell k_0}(Q_1,\cdots ,Q_{\ell k_0})<\lambda _0^\ell D(\mathbf {Z}^n)\). But for \(\ell \) large enough, \(\lambda _0^\ell <\tau _0\), which proves the theorem.    \(\square \)

Proof

(of Lemma 2 ). The idea of the proof is the following. Firstly, we apply the Minkowski-type theorem for almost periodic patterns (Theorem 4) to find a uniform constant \(C>0\) and a point \(u_0\in \mathbf {Z}^n{\setminus }\{0\}\) whose norm is “not too big”, such that \(\rho _\varGamma (u_0) > C D(\varGamma )\). Then, we apply Proposition 4 to prove that the difference \(u_0\) in \(\varGamma \) eventually goes to 0; that is, that there exists \(k_0\in \mathbf {N}^*\) and an almost periodic pattern \(\widetilde{\varGamma }\) of positive density (that can be computed) such that there exists a sequence \((Q_k)_k\) of isometries, with \(\Vert Q_i-P_i\Vert \le \delta \), such that for every \(x\in \widetilde{\varGamma }\),

$$ (\widehat{Q_{k_0}}\circ \dots \circ \widehat{Q_1})(x) = (\widehat{Q_{k_0}}\circ \dots \circ \widehat{Q_1})(x+u_0). $$

This makes the density of the \(k_0\)-th image of \(\varGamma \) decrease:

$$ D\big ((\widehat{Q_{k_0}}\circ \dots \circ \widehat{Q_1})(\varGamma )\big ) \le D(\varGamma )-D(\widetilde{\varGamma }); $$

a precise estimation of the density of \(\widetilde{\varGamma }\) will then prove the lemma.

We begin by applying the Minkowski-like theorem for almost periodic patterns (Theorem 4) to a Euclidean ball \(B'_R\) such that (recall that [B] denotes the set of integer points inside B)

$$\begin{aligned} {\text {Leb}}(B'_R) = V_n R^n = 4^n\left\lfloor \frac{1}{D(\varGamma )}\right\rfloor , \end{aligned}$$
(4)

where \(V_n\) denotes the measure of the unit ball on \(\mathbf {R}^n\). Then, Theorem 4 says that there exists \(u_0\in B'_R\cap \mathbf {Z}^n{\setminus }\{0\}\) such that

$$\begin{aligned} \rho _\varGamma (u_0)\ge \frac{D(\varGamma )}{2}. \end{aligned}$$
(5)

We now perturb each matrix \(P_k\) into a totally irrational matrix \(Q_k\) such that for every point \(x\in [B'_R]{\setminus }\{0\}\), the point \(Q_k (x)\) is far away from the lattice \(\mathbf {Z}^n\). More precisely, as the set of matrices \(Q\in O_n(\mathbf {R})\) such that \(Q([B'_R]) \cap \mathbf {Z}^n \ne \{0\}\) is finite, there exists a constant \(d_0(R,\delta )\) such that for every \(P\in O_n(\mathbf {R})\), there exists \(Q\in O_n(\mathbf {R})\) such that \(\Vert P-Q\Vert \le \delta \) and for every \(x\in [B'_R]{\setminus }\{0\}\), we have \(d_\infty (Q(x),\mathbf {Z}^n)> d_0(R,\delta )\). Applying Lemma 4 (which states that if the sequence \((Q_k)_k\) is generic, then the matrices \(Q_k\) are “non resonant”), we build a sequence \((Q_k)_{k\ge 1}\) of totally irrationalFootnote 4 matrices of \(O_n(\mathbf {R})\) such that for every \(k\in \mathbf {N}^*\), we have:

  • \(\Vert P_k-Q_k\Vert \le \delta \);

  • for every \(x\in [B'_R]{\setminus }\{0\}\), we have \(d_\infty (Q_k(x),\mathbf {Z}^n)> d_0(R,\delta )\);

  • the set \((Q_k\circ \widehat{Q_{k-1}} \circ \cdots \circ \widehat{Q_1})(\varGamma )\) is equidistributed modulo \(\mathbf {Z}^n\).

We then consider the difference \(u_0\) (given by Eq. (5)). We denote by \(\lfloor P \rfloor (u)\) the point of the smallest integer cube of dimension \(n'\le n\) that contains P(u) which has the smallest Euclidean norm (that is, the point of the support of \(\varphi _{P(u)}\) with the smallest Euclidean norm). In particular, if \(P(u)\notin \mathbf {Z}^n\), then \(\Vert \lfloor P\rfloor (u)\Vert _2 < \Vert P(u)\Vert _2\) (where \(\Vert \cdot \Vert _2\) is the Euclidean norm). Then, the point (ii) of Proposition 4 shows that

$$\begin{aligned} \rho _{\widehat{Q_1}(\varGamma )}(\lfloor Q_1 \rfloor (u_0))&\ge \frac{D(\varGamma )}{D(\widehat{Q_1}(\varGamma ))} \varphi _{Q_1(\lfloor Q_1 \rfloor (u_0))} (u_0) \rho _\varGamma (u_0)\\&\ge \frac{\big (d_0(R,\delta )\big )^n}{2}D(\varGamma ), \end{aligned}$$

(applying Eq. (5)) and so on, for every \(k\in \mathbf {N}^*\),

$$\begin{aligned} \rho _{(\widehat{Q_k}\circ \cdots \circ \widehat{Q_1})(\varGamma )}\big ((\lfloor Q_{k} \rfloor \circ \cdots \circ \lfloor Q_1 \rfloor )(u_0)\big ) \ge \left( \frac{\big (d_0(R,\delta )\big )^n}{2}\right) ^k D(\varGamma ). \end{aligned}$$

We then remark that the sequence of norms \(\big \Vert (\lfloor Q_{k} \rfloor \circ \cdots \circ \lfloor Q_1 \rfloor )(u_0)\big \Vert _2\) is decreasing and can only take a finite number of values (it lies in \(\sqrt{{\mathbf {Z}}}\)). Then, there exists \(k_0\le R^2\) such that \(\big (\lfloor Q_{k_0} \rfloor \circ \cdots \circ \lfloor Q_1 \rfloor \big ) (u_0) = 0\); in particular, by Eq. (4), we have

$$\begin{aligned} k_0\le \left( \frac{4^n}{V_n}\left\lfloor \frac{1}{D(\varGamma )}\right\rfloor \right) ^{2/n}. \end{aligned}$$

Then, point (ii) of Remark 1 applied to \(v_0 = 0\) implies that the density of the image set satisfies

$$\begin{aligned} D\big ((\widehat{Q_k}\circ \cdots \circ \widehat{Q_1})(\varGamma )\big ) \le \left( 1-\left( \frac{\big (d_0(R,\delta )\big )^n}{2}\right) ^{k_0}\right) D(\varGamma ). \end{aligned}$$

The conclusions of the lemma are obtained by setting \(\lambda _0{\,=\,} 1{\,-\,}\left( \frac{(d_0(R,\delta ))^n}{2}\right) ^{k_0}\).    \(\square \)

4 Conclusion

By mean of Theorem 1, we have shown why it is illusory to hope that the naive algorithm of rotation of a numerical image gives good results: applying successively the discretizations of a generic sequence of rotations leads to a complete loss of information.