1 Introduction

The digital plane is a lattice whose elements are points with integer coordinates, the so called lattice points. A function \({\mathbb R}^2 \mapsto {\mathbb R}^2\) can be represented by a function \({\mathbb Z}^2 \mapsto {\mathbb Z}^2\) only approximately, by rounding its values to a lattice point. Rounding is a mapping \(q :{\mathbb R}^2 \mapsto {\mathbb Z}^2\). The discrete variant of the function \(f :{\mathbb R}^2 \mapsto {\mathbb R}^2\) is \(q\circ f\). Of course there are plenty discrete variants of f. One of the most studied function of the plane is the rotation, which is a \(2\times 2\) real matrix with eigenvalues \(\cos \varphi + i \sin \varphi \) and \(\cos \varphi - i \sin \varphi \). Let us denote it by \(Q_{\varphi }\). There exists an invertible real matrix Q such that \(Q_{\varphi } = Q A_{\varphi } Q^{-1}\) with

$$\begin{aligned} A_{\varphi }= \begin{pmatrix} \cos \varphi &{}\quad -\sin \varphi \\ \sin \varphi &{}\quad \cos \varphi \end{pmatrix} \end{aligned}$$

For \((x,y)\in {\mathbb R}^2\) the sequence of points \(\{f^n(x,y)\}_{n=0}^{\infty }\) is called an orbitFootnote 1 of f generated by (xy). The orbits of \(Q_{\varphi }\) generated by any non-zero points lie on an ellipse, those of \(A_{\varphi }\) on the unit circle. Plainly \(Q_{\varphi }\) is a bijective mapping on \({\mathbb R}^2\), but usually not bijective on \({\mathbb Z}^2 \), even after some rounding. Combining it with a rounding, which results the function \(q \circ Q_{\varphi }\) we obtain a mapping of \({\mathbb Z}^2 \mapsto {\mathbb Z}^2\), which is a discrete rotation in wide sense. Many interesting and hard questions appear: is a discrete rotation injective, surjective or bijective? What about its orbits? All orbits of \(Q_{\varphi }\) are bounded, but this is not at all clear for its discrete variants. The investigation of such questions have long tradition, see the early example [6].

FLOOR,Footnote 2 ROUNDFootnote 3 and TRUNCFootnote 4 are eminent examples of rounding functions. Discretizing the rotation with them the resulted mappings \({\mathbb Z}^2 \mapsto {\mathbb Z}^2\) are more or less different. Kozyakin et al. [9] gave a good overview on the results concerning discretized rotations, especially on \({{\,\mathrm{ROUND}\,}}\circ A_{\varphi }\) and \(TRUNC \circ A_{\varphi }\). Diamond et al. [7] proved that if \(\varphi \not = k\frac{\pi }{2}\), \(k\in {\mathbb Z}\) then all orbits of \({{\,\mathrm{TRUNC}\,}}\circ A_{\varphi }\) eventually gets into the zero point. The situation is very different with \({{\,\mathrm{ROUND}\,}}\circ A_{\varphi }\). Kozyakin et al. [9] proved among others that if the rotation angle \(\varphi \) is such that the rows of all the nonnegative powers of the matrix \(A_{\varphi }\) are rationally independent then the density of lattice points with empty full preimages is positive. They used measure theoretic approach, which allowed them to prove much more general results too. For other probabilistic results on discrete rotations we refer to [6, 8, 13, 14].

In former investigations of the second author with different coauthors [1,2,3,4] a kind of discrete rotation appears as a natural generalization of positional number systems. It was given by \({{\,\mathrm{FLOOR}\,}}\circ B_{\varphi }\) with

$$\begin{aligned} B_{\varphi }= \begin{pmatrix} 0 &{}\quad 1\\ -1 &{}\quad -\lambda \end{pmatrix}, \quad \lambda = -2\cos \varphi . \end{aligned}$$

We come back to this function later, but before we discuss some properties of the FLOOR function. It commutes with the additive group of translations of \({\mathbb Z}^2\) and the full preimage of zero is \([0,1[ \times [0,1 [ \), which is Jordan measurable, thus FLOOR, like ROUND, is a quantizer in the sense of [9]. Hence the discretized rotation \({{\,\mathrm{FLOOR}\,}}\circ A_{\varphi }\) has similar properties as \({{\,\mathrm{ROUND}\,}}\circ A_{\varphi }\). This holds, among others, for the above mentioned property of preimages.

In this note we prove under the natural assumption \(\varphi \not = k\frac{\pi }{2}\) that the function \({{\,\mathrm{FLOOR}\,}}\circ A_{\varphi }\) is neither surjective nor injective. More precisely we prove lower density estimates for the sets of lattice points, which are the images of two lattice points as well as of lattice points, which have no preimages. It turns out, see Theorems 3.1 and 4.2, that these densities are positive. This means that the number of such lattice points lying in a box symmetric to the origin and of side length \(2M+1\) is \(O(M^2)\). In Sect. 6 we indicate that the same results hold to \({{\,\mathrm{ROUND}\,}}\circ A_{\varphi }\) too. We use in the proof elementary results of uniform distribution theory and properties of primitive Pythagorean triplets. Our results are more precise than those in [9].

There are discrete rotations which are bijective. Trivial examples are \({{\,\mathrm{FLOOR}\,}}\circ A_{\varphi }\) with \(\varphi =k\frac{\pi }{2}\), \(k\in {\mathbb Z}\). More interesting are the functions \({{\,\mathrm{FLOOR}\,}}\circ B_{\varphi }\), \(0\le \varphi <2\pi \). Reeve-Black and Vivaldi [12] claim that a generic discrete rotation is neither injective nor surjective. Our results justify this claim for the function \({{\,\mathrm{FLOOR}\,}}\circ A_{\varphi }\). To prove similar characterization for \({{\,\mathrm{FLOOR}\,}}\circ Q_{\varphi }\) is a challenging problem. We expect that apart the previous examples only the transpose of \(B_{\varphi }\) lies in the exceptional set.

Despite many efforts and interesting results, we have deterministic knowledge only on the orbits of \({{\,\mathrm{FLOOR}\,}}\circ B_{\varphi }\). For the eleven values \(2\cos \varphi = \lambda = 0,\pm 1, (\pm 1 \pm \sqrt{5})/2, \pm \sqrt{2}, \pm \sqrt{3}\) all orbits are periodic, see [2, 3, 10]. Generally it was proved by Akiyama and Pethő [4] that for any \(\varphi \) there are infinitely many periodic orbits. This is still far from proving the conjecture that all orbits are periodic see [2].

The matrix \(A_{\varphi }\) through \(A_{\varphi }\cdot (a,b), (a,b)\in {\mathbb R}^2\)Footnote 5 induces a linear mapping on \({\mathbb R}^2\), which we will denote by \(A_{\varphi }\) too.

FLOOR and integer part \(\lfloor .\rfloor \) are the same functions, in the sequel we will use the later. To simplify our notation we define \(r_{\varphi } :{\mathbb Z}^2 \mapsto {\mathbb Z}^2\) by

$$\begin{aligned} r_{\varphi }(a,b)&= \lfloor A_{\varphi }(a,b) \rfloor \\&= (\lfloor a \cos \varphi - b \sin \varphi \rfloor , \lfloor a \sin \varphi + b \cos \varphi \rfloor ). \end{aligned}$$

We computed the orbits of \(r_{\varphi }\) for many choices of the angle and the starting point and found always periodicity. For the angle \(\varphi = \frac{\pi }{4}\) we found infinitely many starting points which generate short periodic orbit, see Theorem 5.2. Based on our numerical and theoretical results we propose the following conjecture

Conjecture 1.1

Every orbit of \(r_{\varphi }\) is periodic.

We also use the fractional part function, i.e, \(\{x\}= x-\lfloor x \rfloor \). Both functions will be applied coordinate wise to the points of the real vector spaces. We use the same notation to these extended functions. Let \(U=[0,1[ \times [0,1 [ \) and \(\bar{U}=[0,1] \times [0,1]\), then obviously \(r_{\varphi }(a,b)=(x,y)\in {\mathbb Z}^2\) if and only if \(A_{\varphi }\cdot (a,b)=(x,y)+u\) for some \(u\in U\). The third equivalent expression is \(\{A_{\varphi }\cdot (a,b)\} = A_{\varphi }\cdot (a,b)- r_{\varphi }(a,b)\).

2 Preliminary results

In order to prove our main results we need some tools from uniform distribution theory. Let \(\mathbf{a}=(a_1,\ldots ,a_n), \mathbf{b}=(b_1,\ldots ,b_n)\in {\mathbb R}^n\) be such that \(0\le a_j<b_j\le 1\), \( j=1,\ldots ,n\) then we set \(B_{\mathbf{a,b}}=[a_1,b_1[\times \cdots \times [a_n,b_n [ \). This is a box with side lengths \(b_1-a_1,\ldots ,b_n-a_n\), whose volume is plainly \(\prod _{j=1}^{n}(b_j-a_j)\). For a sequence of n-dimensional real vectors \(X=(\mathbf{x}_m)\) set

$$\begin{aligned} A(X, B_{\mathbf{a,b}},N) = |\{m :0\le m\le N, \{\mathbf{x}_m\}\in B_{\mathbf{a,b}}\}|, \end{aligned}$$

where |S| denotes the cardinality of the set S.

The sequence X is called uniformly distributed modulo 1, shortly uniformly distributed if

$$\begin{aligned} \lim _{N\rightarrow \infty } \frac{A(X,B_{\mathbf{a,b}},N)}{N} = \prod _{j=1}^{n}(b_j-a_j) \end{aligned}$$

holds for all \(\mathbf{a,b}\in {\mathbb R}^n\) with the above property. Notice that if X is uniformly distributed then for any \(B_{\mathbf{a,b}}\) there exists a constant \(c= c_\mathbf{a,b}>0\) such that

$$\begin{aligned} A(X, B_{\mathbf{a,b}},N)> c N \end{aligned}$$
(2.1)

holds for all large enough N. Indeed, one may set \(c = \prod _{j=1}^{n}(b_j-a_j)-\varepsilon \) for some \(\varepsilon >0\).

The following theorem is a bit modified version of Theorem I, p. 64 of Cassels [5] and it plays a crucial role in this paper.

Theorem 2.1

Let \(L_j(\mathbf{x})\) for \(1\le j\le m\) be homogeneous linear forms in the n variables \(\mathbf{x}=(x_1,\ldots ,x_n)\). Suppose that the only set of integers \(u_1\), ..., \(u_m\) such that

$$\begin{aligned} u_1L_1(\mathbf{x})+\cdots + u_mL_m(\mathbf{x}) \end{aligned}$$

has integer coefficients in \(x_1\), ..., \( x_n\) is \(u_1=\cdots =u_m=0\). Then the set of vectors \(\mathbf{z}^{(\mathbf{x})} = (L_1(\mathbf{x}),\dots ,L_m(\mathbf{x}))\) for integral \(\mathbf{x}\) is uniformly distributed modulo 1.

Now we formulate the main lemma of this paper.

Lemma 2.2

Let \(0<t_1,t_2\le 1\) and set \(L_1(x_1,x_2) = x_1 \cos \varphi - x_2 \sin \varphi \), \(L_2(x_1,x_2) = x_1 \sin \varphi + x_2\cos \varphi \). If \(\varphi \not = k\frac{\pi }{2}\), \(k \in {\mathbb Z}\) then there exists a constant \(c_1>0\) depending only on \(\varphi \), \(t_1\), \(t_2\) such that the number of solutions \((x_1,x_2)\in {\mathbb Z}^2, |x_1|,|x_2|\le M\) of the system of inequalities

$$\begin{aligned} 0\le \{L_1(x_1,x_2)\}&< t_1 \end{aligned}$$
(2.2)
$$\begin{aligned} 0\le \{L_2(x_1,x_2)\}&< t_2 \end{aligned}$$
(2.3)

is at least \(c_1M^2\).

The same statement holds for the number of solutions in pairs of odd integers.

There are only \((2M+1)^2\) integer pairs with \(|x_1|,|x_2|\le M\), thus our lower estimate is up to constant best possible.

Proof

In the proof we have to distinguish three cases according the arithmetic nature of \(\cos \varphi \) and \(\sin \varphi \).

Case 1. \(1,\sin \varphi ,\cos \varphi \) are \({\mathbb Q}\)-linearly independent. Then the linear forms \(L_1(x_1,x_2)\), \(L_2(x_1,x_2)\) satisfy the assumptions of Theorem 2.1, thus the points \((\{L_1(a,b)\},\{L_2(a,b)\} ) \) for \(a,b\in {\mathbb Z}\) are uniformly distributed in \([0,1[^2.\)

There are \((2M+1)^2\) points \((a,b)\in {\mathbb Z}^2\) with \(|a|,|b|\le M\), thus setting \(B=[0,t_1[ \times [0,t_2 [ \) and \(N=(2M+1)^2\) in (2.1) we obtain the statement immediately.

If \((\{L_1(a,b)\},\{L_2(a,b)\} ) \) for \(a,b\in {\mathbb Z}\) is uniformly distributed in \([0,1[^2\) then the same holds if (ab) runs through a sublattice of \({\mathbb Z}^2\), which proves the second assertion. In Case 2 we use the uniformly distributed property of some sequence, hence for them the second assertion holds by the above remark.

Case 2. \(\cos \varphi = r_1\sin \varphi +r_2 \), where \(r_1,r_2\in {\mathbb Q}\), \(r_1\ne 0\), and \(\sin \varphi \notin {\mathbb Q}.\) There exist integers \(p_1\), \(p_2\), q with \(q> 0 \) such that \(r_1=\frac{p_1}{q}\) and \(r_2=\frac{p_2}{q} \). For any \((a,b)\in {\mathbb Z}^2\) there exist \(u,v,s,t\in {\mathbb Z}, \; 0\le s,t<q\) such that \(a=uq+s\) and \(b=vq +t\). With these notations we obtain

$$\begin{aligned} L_1(a,b)&= \left( a\frac{p_1}{q}-b\right) \sin \varphi + \frac{ap_2}{q} \\&= (up_1-vq)\sin \varphi + \left( \frac{sp_1}{q}-t\right) \sin \varphi + \frac{ap_2}{q} \end{aligned}$$

and similarly

$$\begin{aligned} L_2(a,b) = (uq+vp_1)\sin \varphi + \left( s+\frac{tp_1}{q}\right) \sin \varphi + b\frac{p_2}{q}. \end{aligned}$$

Fix st and set \(f_1=\left\{ \left( \frac{sp_1}{q}-t\right) \sin \varphi + \frac{ap_2}{q}\right\} \) and \(f_2=\left\{ \left( s+\frac{tp_1}{q}\right) \sin \varphi + b\frac{p_2}{q}\right\} .\) We have \(0\le f_1,f_2<1 \). With these notations we have to count the number of solutions of the system of inequalities

$$\begin{aligned} 0&\le \left\{ (up_1-vq)\sin \varphi +f_1\right\}<t_1\\ 0&\le \left\{ (uq+vp_1)\sin \varphi +f_2\right\} <t_2 \end{aligned}$$

in the integers uv with \(|u|,|v|\le \frac{M}{q}-1 \). We have to distinguish two subcases.

Case 2.1. \(p_1\not =\pm q\). The number \(D=q^2-p_1^2\) is non-zero. As \(\sin \varphi \notin {\mathbb Q}\) and \(D\in {\mathbb Z}\) we have \(D \sin \varphi \notin {\mathbb Q}\), hence the sequence \((\{nD\sin \varphi \})\) is uniformly distributed in [0, 1[ . Thus the inequality

$$\begin{aligned} 0\le \left\{ u D\sin \varphi + f \right\} \le t \end{aligned}$$

has for any fixed \(0\le f<1\), \( 0<t<1\) at least \(O(M')\) solutions in \(u\in {\mathbb Z}\), \( |u|\le M'\), where the positive constant indicated by the O notation depends only on \(\sin \varphi \) and on t. Hence the system of the (independent) inequalities

$$\begin{aligned} 0&\le \left\{ u_1 D\sin \varphi +f_1\right\} <t_1 \end{aligned}$$
(2.4)
$$\begin{aligned} 0&\le \left\{ u_2 D\sin \varphi +f_2\right\} <t_2 \end{aligned}$$
(2.5)

has at least \(O(M'^2)\) solutions in \((u_1,u_2)\in {\mathbb Z}^2\), \( |u_1|,|u_2|\le M'\).

For all such pairs the system of linear equations

$$\begin{aligned} up_1-vq&= u_1(q^2-p_1^2)\\ uq+vp_1&= u_2(q^2-p_1^2) \end{aligned}$$

has unique solution in \(u,v\in {\mathbb Z}\), i.e. (uv) solves our original system of equations. Using Cramer’s rule we obtain

$$\begin{aligned} u = \frac{(u_1p_1+u_2q)(q^2-p_1^2)}{p_1^2+q^2} \quad \text{ and } \quad v= \frac{(u_2p_1-u_1q)(q^2-p_1^2)}{p_1^2+q^2}. \end{aligned}$$

Thus \(|u|,|v| \le 2qM'\). Hence choosing \(M'=\frac{M}{2q^2}\) we can produce at least \(O(M^2)\) integer solutions of (2.2) and (2.3).

Case 2.2. \(p_1=\pm q\). Repeating the argument of the last case with \(D=2p_1\) we obtain \(O(M^2)\) solutions \((u_1,u_2)\in {\mathbb Z}^2\) of the system of inequalities (2.4), (2.5) with \(|u_1|,|u_2|\le M/2\). For all such pairs the system of equations

$$\begin{aligned} up_1-vq&= p_1(u\mp v) = 2p_1 u_1\\ uq + vp_1&= \pm p_1(u\pm v) = 2p_1 u_2 \end{aligned}$$

has unique solution in \((u,v)\in {\mathbb Z}^2\) with \(|u|,|v|\le M\). This completes the proof of Case 2.

Case 3. \(\sin \varphi ,\cos \varphi \in {\mathbb Q}\). Although the statement is the same as in the other cases, we have to use different tools in the proof, because Theorem 2.1 does not hold. We have a kind of discrete uniform distribution treated systematically in Narkiewicz [11]. First we set \(\sin \varphi =\frac{p_1}{q}\), \( \cos \varphi =\frac{p_2}{q} \), where \(p_1,p_2,q\in {\mathbb Z}\), \( p_1,p_2,q\ne 0 \). Then

$$\begin{aligned} 1=\sin ^2\varphi +\cos ^2\varphi = \frac{p_1^2}{q^2}+\frac{p_2^2}{q^2}, \end{aligned}$$

which implies \(p_1^2+p_2^2=q^2 \), i.e. \(p_1\), \(p_2\), q is a Pithagorean triple, and we may assume that it is primitive, i.e. \(\gcd (p_1,q)=\gcd (p_2,q)=1 \). Then there are \(u,v\in {\mathbb Z}\), \(u\not \equiv v \pmod 2 \), \(\gcd (u,v)=1\) such that \(p_1=u^2-v^2\), \(p_2=2uv\) or \(p_1=2uv\), \(p_2=u^2-v^2\) and \(q=u^2+v^2 \). We work out in the sequel only the first possibility, because the alternative case can be handled analogously.

With these notations and \((a,b)\in {\mathbb Z}^2\) we have

$$\begin{aligned} L_1(a,b)&= a\frac{2uv}{u^2+v^2} - b\frac{u^2-v^2}{u^2+v^2}, \\ L_1(a,b)&= a\frac{u^2-v^2}{u^2+v^2} + b\frac{2uv}{u^2+v^2}. \end{aligned}$$

Because \(\gcd (2uv,u^2+v^2)=1\) there exists an integer \(0<h<u^2+v^2=q\) such that

$$\begin{aligned} 2uvh\equiv u^2-v^2 \pmod {u^2+v^2}. \end{aligned}$$
(2.6)

For fixed \(a,b\in {\mathbb Z}\) there exist \(d,d_1\in {\mathbb Z}\) such that \(a-hb=d(u^2+v^2)+d_1 \), where \(0\le d_1<u^2+v^2 \). Then

$$\begin{aligned} a(u^2-v^2)+2buv = bh(u^2-v^2)+d(u^4-v^4)+d_1(u^2-v^2)+2buv. \end{aligned}$$

Multiplying this by 2uv and taking (2.6) into account we obtain

$$\begin{aligned} 2uv(a(u^2-v^2)+2buv)&\equiv 2uvhb(u^2-v^2)+2uvd_1(u^2-v^2)+b(2uv)^2 \\&\equiv b((u^2-v^2)^2+4u^2v^2)+2uvd_1(u^2-v^2)\\&\equiv b(u^2+v^2)^2+2uvd_1(u^2-v^2)\\&\equiv 2uvd_1(u^2-v^2) \pmod {u^2+v^2}. \end{aligned}$$

Since \(\gcd (2uv,u^2+v^2)=1\), we obtain

$$\begin{aligned} a(u^2-v^2)+2buv \equiv d_1(u^2-v^2) \pmod {u^2+v^2}. \end{aligned}$$
(2.7)

On the other hand, by (2.6) we get

$$\begin{aligned} 2uva-(u^2-v^2)b&\equiv b(2uvh-(u^2-v^2))+2uvd_1\\&\equiv 2uvd_1 \pmod {u^2+v^2}. \end{aligned}$$

Hence

$$\begin{aligned} \{L_1(a,b)\} = \left\{ \frac{2uvd_1}{u^2+v^2}\right\} \end{aligned}$$

and

$$\begin{aligned} \{L_2(a,b)\} = \left\{ \frac{(u^2-v^2)d_1}{u^2+v^2}\right\} . \end{aligned}$$

Choosing \(d_1=0\), which implies \(a= hb+d(u^2-v^2)\) we obtain that the pair \((a,b)\in {\mathbb Z}^2\) solves the system of inequalities (2.2), (2.3).

Finally, choosing \(b,d\in {\mathbb Z}\) such that \(|b|\le \frac{M}{2q}< \frac{M}{2h}\) and \(|d|\le \frac{M}{2|p_1|} = \frac{M}{2|u^2-v^2|}\) we obtain \(|a|\le M\), hence such \((a,b)\in {\mathbb Z}^2\) pairs not only solve the system of inequalities (2.2),(2.3), but satisfy \(|a|,|b|\le M\) too. Plainly the number of such pairs is at least \(O(M^2)\) and the lemma is completely proved.

Choosing b odd a is odd too for all odd or even d depending on the parities of h and \(u^2-v^2\). The argument of the last paragraph proves the second assertion in this case. \(\square \)

3 Injectivity of digital rotation

Before stating the main result of this section we introduce a notation: \(T_{\varphi }(M)\) denotes the number of \((x,y)\in {\mathbb Z}^2\) such that \(|x|,|y|\le M\) and (xy) is the image by \(r_{\varphi }\) of two different grid points. If \(\varphi = k\frac{\pi }{2}, k\in {\mathbb Z}\) then \(r_{\varphi } = A_{\varphi }\), thus it is bijective, i.e. \(T_{\varphi }(M)=0\). Otherwise, we prove that \(T_{\varphi }(M)\) tends to infinity.

Theorem 3.1

If \(\varphi \not = k\frac{\pi }{2}, k \in {\mathbb Z}\) then there exist constants \(c_2>0\) depending only on \(\varphi \) such that \(T_{\varphi }(M) \ge c_2M^2\).

Proof

Let \((a_1,b_1), (a_2,b_2) \in {\mathbb Z}^2\) such that \(r_{\varphi }(a_1,b_1)=r_{\varphi }(a_2,b_2)\). Then

$$\begin{aligned} \lfloor a_1 \cos \varphi - b_1 \sin \varphi \rfloor&= \lfloor a_2 \cos \varphi - b_2 \sin \varphi \rfloor \\ \lfloor a_1 \sin \varphi + b_1 \cos \varphi \rfloor&= \lfloor a_2 \sin \varphi + b_2 \cos \varphi \rfloor , \end{aligned}$$

which implies

$$\begin{aligned} (a_1-a_2) \cos \varphi - (b_1-b_2) \sin \varphi&= u_1 \\ (a_1-a_2) \sin \varphi + (b_1-b_2) \cos \varphi&= u_2 \end{aligned}$$

for some \(-1<u_1,u_2<1\). After squaring and adding these equations we obtain

$$\begin{aligned} (a_1-a_2)^2 + (b_1-b_2)^2 = u_1^2 + u_2^2 <2. \end{aligned}$$

As \(a_1-a_2\) and \(b_1-b_2\) are integers the right hand side can be either zero ore one. The first case is excluded because either \(a_1-a_2\) or \(b_1-b_2\) is nonzero. Thus we have the following four possibilities:

$$\begin{aligned} \begin{array}{c|c|c|c|c} a_1-a_2 &{} -1 &{} 0 &{} 0 &{} 1\\ \hline b_1-b_2 &{} 0 &{} -1 &{} 1 &{} 0 \end{array} \end{aligned}$$

This implies that if two grid points have the same image by \(r_{\varphi } \), then they are neighbors.

Now, we show that for each \(\varphi \) there exist infinitely many neighbors such that \(r_{\varphi }(a_1,b_1)=r_{\varphi }(a_2,b_2).\)

First, we assume \(a_1=a_2\) and \(b_2=b_1+1 \). Inserting them into the starting equations we obtain

$$\begin{aligned} \lfloor a_1\cos \varphi -b_1\sin \varphi \rfloor = \lfloor a_1\cos \varphi -b_1\sin \varphi -\sin \varphi \rfloor \end{aligned}$$
(3.1)

and

$$\begin{aligned} \lfloor a_1\sin \varphi +b_1\cos \varphi \rfloor = \lfloor a_1\sin \varphi +b_1\cos \varphi +\cos \varphi \rfloor \end{aligned}$$
(3.2)

If \(\varphi \in \left]\frac{3\pi }{2},2\pi \right[ \), then \(\sin \varphi <0\) and \(\cos \varphi >0\) and the system of equations (3.1) and (3.2) holds if and only if

$$\begin{aligned} 0 \le \{L_1(a_1,b_1)\} = \{a_1\cos \varphi -b_1\sin \varphi \} < 1 + \sin \varphi \end{aligned}$$
(3.3)

and

$$\begin{aligned} 0 \le \{L_2(a_1,b_1)\} = \{a_1\sin \varphi +b_1\cos \varphi \} < 1 - \cos \varphi . \end{aligned}$$
(3.4)

Observe that \(L_1,L_2\) are the linear forms introduced in Lemma 2.2, further setting \(t_1=1 + \sin \varphi \), \( t_2 = 1 - \cos \varphi \) the lemma implies our statement in this case.

The other cases can be handled similarly we give only the important data for repeating the argument.

If \(a_2=a_1+1\) and \(b_2=b_1 \), then (3.1), (3.2) reads \([L_1(a_1,b_1)] = [L_1(a_1,b_1) + \cos \varphi ]\) and \([L_2(a_1,b_1)] = [L_2(a_1,b_1) + \sin \varphi ]\). If \(\varphi \in \left] 0,\frac{\pi }{2} \right[ \) then \(\sin \varphi ,\cos \varphi >0\) and setting \(t_1=1 - \cos \varphi \), \(t_2 = 1 - \sin \varphi \) we can apply Lemma 2.2.

If \(a_2=a_1\) and \(b_2=b_1-1 \), then (3.1), (3.2) reads \([L_1(a_1,b_1)] = [L_1(a_1,b_1) + \sin \varphi ]\) and \([L_2(a_1,b_1)] = [L_2(a_1,b_1) - \cos \varphi ]\). If \(\varphi \in \left] \frac{\pi }{2},\pi \right[ \) then \(\sin \varphi >0\) and \(\cos \varphi <0\) and setting \(t_1=1 - \sin \varphi \), \( t_2 = 1 + \cos \varphi \) we are done by Lemma 2.2.

Finally if \(a_2=a_1-1\) and \(b_2=b_1 \), then (3.1), (3.2) reads \([L_1(a_1,b_1)] = [L_1(a_1,b_1) - \cos \varphi ]\) and \([L_2(a_1,b_1)] = [L_2(a_1,b_1) - \sin \varphi ]\). If \(\varphi \in \left]\pi ,3\frac{\pi }{2} \right[ \) then \(\sin \varphi ,\cos \varphi <0\) and setting \(t_1=1 + \cos \varphi \), \( t_2 = 1 + \sin \varphi \) finishes the proof by Lemma 2.2. \(\square \)

4 Surjectivity of digital rotation

In the previous section we proved that the digital rotation is usually not injective. Now we prove that usually it is not surjective either. To achieve our goal we need an elementary geometric lemma. To state and prove it we introduce some notation. For a point \((a,b)\in \mathbb {R}^2\) put \(T_{(a,b)} = (a,b)+ U\) and \(\bar{T}_{(a,b)}=(a,b)+ \bar{U}\), where \(+\) means here translation. The squares \(T_{(a,b)}, \; (a,b)\in {\mathbb Z}^2\) are disjoint and their union cover \(\mathbb {R}^2\). As \(A_{\varphi }\) is a rotation the sets \(A_{\varphi }(T_{(a,b)})\) are squares too with the same properties. Thus there exists for any \((n,m)\in \mathbb {Z}^2\) unique \((a,b)\in {\mathbb Z}^2\) such that \((n,m) \in A_{\varphi }(T_{(a,b)})\).

Lemma 4.1

Let \((n,m)\in {\mathbb Z}^2 \). Then \((n,m)\ne r_{\varphi }(a,b)\) for each \((a,b)\in {\mathbb Z}^2\) if and only if \((n,m)\in A_{\varphi }(T_{(a,b)})\) and \(A_{\varphi }(a+\varepsilon _a, b+\varepsilon _b)\notin T_{(n,m)}\) for each \(\varepsilon _a,\varepsilon _b\in \{0,1\} \). Moreover in this case the points \(A_{\varphi }(a+\varepsilon _a, b+\varepsilon _b), \varepsilon _a,\varepsilon _b\in \{0,1\}\) belong in some order to the horizontal and vertical neighbour squres to \(T_{(n,m)}\).

Proof

Necessity: If \(A_{\varphi }(a+\varepsilon _a, b+\varepsilon _b)\in T_{(n,m)}\) for some \(\varepsilon _a,\varepsilon _b\in \{0,1\} \), then \(r_{\varphi }(a+\varepsilon _a, b+\varepsilon _b)=(n,m) \), thus (nm) is the image of some point.

Sufficiency: We have \(T_{(a,b)}=(a,b)+T_{(0,0)} \), therefore \(A_{\varphi }(T_{(a,b)})=A_{\varphi }(a,b)+A_{\varphi }(T_{(0,0)}) \), since \(A_{\varphi }\) is linear. The same holds for the closure of \(T_{(a,b)} \), denoted by \(\overline{T_{(a,b)}} \). In Fig. 1 we show the four main situations of the rotated unit square.

Fig. 1
figure 1

The situation of \(A_{\varphi }(T_{(0,0)})\)

We give the proof of the lemma in detail only for the case \(\frac{3\pi }{2}<\varphi <2\pi \), the other cases can be handled similarly. Assume that \((n,m)\in A_{\varphi }(T_{(a,b)})\), but \(A_{\varphi }(a+\varepsilon _a, b+\varepsilon _b)\notin T_{(n,m)}\) for each \(\varepsilon _a,\varepsilon _b\in \{0,1\} \). Then we have

$$\begin{aligned}&A_{\varphi }(a,b+1)_y< m, \ \ A_{\varphi }(a+1,b)_y\ge m+1, \\&A_{\varphi }(a,b)_x < n, \ \ A_{\varphi }(a+1,b+1)_x\ge n+1. \end{aligned}$$

Here and in the sequel, \(A_{\varphi }(.,.)_x\), \(A_{\varphi }(.,.)_y\) denote the x (respectively y) coordinate of the corresponding point. Notice that the two strong inequalities are due to the assumption \(A_{\varphi }(a+\varepsilon _a, b+\varepsilon _b)\notin T_{(n,m)}\) for each \(\varepsilon _a,\varepsilon _b\in \{0,1\}.\)

We show that \(T_{(n,m)}{\setminus } A_{\varphi }(\overline{T_{(a,b)}})\) is the union of three disjoint triangles \(H_1\), \(H_2\), \(H_3\). The triangle \(H_1\) is bordered by the lines \(x=n, y=m+1\) and by the line segment between the points \(A_{\varphi }(a,b)\) and \(A_{\varphi }(a+1,b)\). Similarly \(H_2\) is bordered by the lines \(x=n+1\), \( y=m+1\) and by the line segment between the points \(A_{\varphi }(a+1,b)\) and \(A_{\varphi }(a+1,b+1)\). Finally, the borders of \(H_3\) are the lines \(x=n\), \(y=m+1\) and the line segment between the points \(A_{\varphi }(a,b+1)\) and \(A_{\varphi }(a+1,b+1)\).

That are proper triangles. For example, look at \(H_1 \). The triangle with vertices \(A_{\varphi }(a+1,b)\), \( A_{\varphi }(a+1,b+1)\) and the intersection of the lines \(x=A_{\varphi }(a+1,b)_x\) and \(y = A_{\varphi }(a+1,b+1)_y\) is rectangular and the legth of its hypotenuse is 1, thus \(A_{\varphi }(a+1,b+1)_x- A_{\varphi }(a+1,b)_x <1\), which together with the above inequalities implies \(A_{\varphi }(a+1,b)_x> n\). As \(A_{\varphi }(a,b)_x < n\) the line \(x=n\) has an intersection with the line segment between \(A_{\varphi }(a,b)\) and \(A_{\varphi }(a+1,b) \), which is different from the end points. Similarly we have \(A_{\varphi }(a,b)_y - A_{\varphi }(a+1,b)_y<1 \), i.e. \(A_{\varphi }(a,b)_y<m+1 \), hence the line \(y=m+1\) intersects the line segment between \(A_{\varphi }(a,b)\) and \(A_{\varphi }(a+1,b) \). In this case it may happen that the intersection point is \(A_{\varphi }(a+1,b).\)

As a byproduct we proved \(A_{\varphi }(a+1,b)\in T_{(n,m+1)}\), i.e. \(r_{\varphi }(a+1,b) = (n,m+1)\). Performing similar arguments for \(H_2\) and \(H_3\) we obtain that \(A_{\varphi }(a+1,b+1)\in T_{(n+1,m)}\), i.e. \(r_{\varphi }(a+1,b+1) = (n+1,m)\) and \(A_{\varphi }(a,b+1)\in T_{(n,m-1)}\), i.e. \(r_{\varphi }(a,b+1) = (n,m-1)\) respectively. Finally, one can prove \(A_{\varphi }(a,b)\in T_{(n-1,m)}\), i.e. \(r_{\varphi }(a,b) = (n-1,m)\) too, hence the second assertion is proved.

No we finalize the proof of the first assertion. We assume that there exists \((c,d)\in {\mathbb Z}^2 \), such that \(r_{\varphi }(c,d)=(n,m) \). Then \(A_{\varphi }(c,d)\in T_{(n,m)}\) and \((c,d)\notin \overline{T_{(a,b)}} \), i.e. \(A_{\varphi }(c,d)\in T_{(n,m)}{\setminus } A_{\varphi }(\overline{T_{(a,b)}}) \), hence \(A_{\varphi }(c,d)\) is contained in one of the triangles \(H_1,H_2,H_3.\) We have \(H_1\subseteq A_{\varphi }(T_{(a,b-1)}) \), which contains only the grid point \(A_{\varphi }(a,b-1) \), therefore \((c,d)=(a,b-1) \). In contrast, \(A_{\varphi }(a,b-1)_x< A_{\varphi }(a,b)< n,\) i.e. \(\lfloor A_{\varphi }(a,b-1)_x\rfloor < n= \lfloor A_{\varphi }(c,d)_x\rfloor \), which is a contradiction. We have \(H_2\subseteq A_{\varphi }(T_{(a+1,b)})\) and \(H_3 \subseteq A_{\varphi }(T_{(a,b+1)}) \), which implies \((c,d)=(a+1,b)\) and \((c,d)=(a,b+1)\) respectively. The proof of the case \(\frac{3\pi }{2}<\varphi <2\pi \) is finished. As we mentioned above, the three other cases can be handled similarly. \(\square \)

Similarly to Sect. 3 we introduce the function \(N_{\varphi }(M)\), which is the number of grid points (nm), such that \(|n|,|m|\le M \) and which are images of no grid points under the mapping \(r_{\varphi }\). If \(\varphi = k\frac{\pi }{2}, k \in {\mathbb Z}\) then \(r_{\varphi }\) is bijective, hence \(N_{\varphi }(M)=0\). By the next theorem this cannot happen otherwise.

Theorem 4.2

If \(\varphi \not = k\frac{\pi }{2}\), \(k \in {\mathbb Z}\) then there exist constants \(c_3>0\) depending only on \(\varphi \) such that \(N_{\varphi }(M) \ge c_3M^2\).

The orbits generated by points, which are images of no grid points are obviously different. Hence an immediate consequence of the last theorem is:is

Corollary 4.3

If \(\varphi \not = k\frac{\pi }{2}\) then \(r_{\varphi }\) has infinitely many different orbits.

On the other hand many orbits of the above type have common members, i.e. they are not disjoints. It is an open problem whether \(r_{\varphi }\) admits infinitely many disjoint orbits.

Proof of Theorem 4.2

Let \((n,m)\in {\mathbb Z}^2\), which is the image of no grid points under \(r_{\varphi }\). Then, by Lemma 4.1, there exists \((a,b)\in {\mathbb Z}^2\) such that \((n,m)\in A_{\varphi }(T_{(a,b)})\) and \(A_{\varphi }(a+\varepsilon _a,b+\varepsilon _b)\notin T_{(n,m)}\) for all \(\varepsilon _a,\varepsilon _b \in \{0,1\}\). In the same lemma we proved that \(A_{\varphi }(a,b)\), \(A_{\varphi }(a,b+1)\), \(A_{\varphi }(a+1,b)\), \(A_{\varphi }(a+1,b+1)\) belong in some order to the four unit squares left, right, top and down to the unit square \(T_{(n,m)}\). Depending on the size of \(\varphi \) we distinguish four cases.

Case 1: \(0\le \varphi < \frac{\pi }{2}\). Then, by Lemma 4.1, \(A_{\varphi }(a,b)\in T_{(n,m-1)}, A_{\varphi }(a,b+1)\in T_{(n-1,m)}, A_{\varphi }(a+1,b)\in T_{(n+1,m)}, A_{\varphi }(a+1,b+1)\in T_{(n,m+1)}\), which means

$$\begin{aligned} 0&\le a\cos \varphi - b \sin \varphi -n< 1 \\ 0&\le a\cos \varphi - (b+1) \sin \varphi -(n-1)< 1 \\ 0&\le (a+1)\cos \varphi - b \sin \varphi -(n+1)< 1 \\ 0&\le (a+1)\cos \varphi - (b+1) \sin \varphi -n < 1. \end{aligned}$$

Rearranging we obtain the system of inequalities

$$\begin{aligned} 0&\le a\cos \varphi - b \sin \varphi -n < 1 \end{aligned}$$
(4.1)
$$\begin{aligned} \sin \varphi -1&\le a\cos \varphi - b \sin \varphi -n < \sin \varphi \end{aligned}$$
(4.2)
$$\begin{aligned} 1-\cos \varphi&\le a\cos \varphi - b \sin \varphi -n < 2 -\cos \varphi \end{aligned}$$
(4.3)
$$\begin{aligned} \sin \varphi -\cos \varphi&\le a\cos \varphi - b \sin \varphi -n < 1+\sin \varphi -\cos \varphi . \end{aligned}$$
(4.4)

As \(0\le \varphi < \frac{\pi }{2}\) we have \(\sin \varphi , \cos \varphi >0\). Under this assumption we have \(\sin \varphi -1< \sin \varphi -\cos \varphi < 1-\cos \varphi \) and \(0< 1-\cos \varphi \) holds too. Hence \(\max \{\sin \varphi -1, \sin \varphi -\cos \varphi , 1-\cos \varphi ,0\} = 1-\cos \varphi \).

Similarly, \(\sin \varphi<1 < 2 -\cos \varphi \) and \(\sin \varphi < 1+\sin \varphi -\cos \varphi \), thus \(\min \{\sin \varphi ,1, 2 -\cos \varphi , 1+\sin \varphi -\cos \varphi \} = \sin \varphi \). Hence the inequalities (4.1)–(4.4) hold if and only if

$$\begin{aligned} 1-\cos \varphi \le a\cos \varphi - b \sin \varphi -n < \sin \varphi . \end{aligned}$$

After multiplying by 2 and adding \(\cos \varphi -\sin \varphi -1\) we obtain

$$\begin{aligned} 1- \cos \varphi -\sin \varphi \le (2a+1)\cos \varphi - (2b+1) \sin \varphi -2n-3 < \sin \varphi + \cos \varphi -1. \end{aligned}$$
(4.5)

Performing the analogous computation for m we get that \(a,b,m\in {\mathbb Z}\) satisfy the requirements if and only if

$$\begin{aligned} 1- \cos \varphi -\sin \varphi \le (2a+1)\sin \varphi + (2b+1) \cos \varphi -2m-1 < \sin \varphi + \cos \varphi -1. \end{aligned}$$
(4.6)

As \(\sin \varphi + \cos \varphi -1>0\), hence \(1-\sin \varphi - \cos \varphi <0\) we can apply Lemma 2.2 to the system of inequalities (4.5) and (4.5) with \(x_1=2a+1\) and \(x_2=2b+1\), which proves the theorem in this case.

Case 2: \(\frac{\pi }{2}< \varphi < \pi \). Then by Lemma 4.1\(A_{\varphi }(a,b)\in T_{(n+1,m)}, A_{\varphi }(a,b+1)\in T_{(n,m-1)}, A_{\varphi }(a+1,b)\in T_{(n,m+1)}, A_{\varphi }(a+1,b+1)\in T_{(n-1,m)}\). Then

$$\begin{aligned} 0&\le a\cos \varphi - b \sin \varphi -(n+1)< 1 \\ 0&\le a\cos \varphi - (b+1) \sin \varphi -n< 1 \\ 0&\le (a+1)\cos \varphi - b \sin \varphi -n< 1 \\ 0&\le (a+1)\cos \varphi - (b+1) \sin \varphi -(n-1) < 1. \end{aligned}$$

Rearranging the inequalities we obtain

$$\begin{aligned} 1&\le a\cos \varphi - b \sin \varphi -n < 2 \end{aligned}$$
(4.7)
$$\begin{aligned} \sin \varphi&\le a\cos \varphi - b \sin \varphi -n < 1+\sin \varphi \end{aligned}$$
(4.8)
$$\begin{aligned} -\cos \varphi&\le a\cos \varphi - b \sin \varphi -n < 1 -\cos \varphi \end{aligned}$$
(4.9)
$$\begin{aligned} \sin \varphi -\cos \varphi -1&\le a\cos \varphi - b \sin \varphi -n < \sin \varphi -\cos \varphi . \end{aligned}$$
(4.10)

We have \(\sin \varphi >0\), \(\cos \varphi <0\), because \(\frac{\pi }{2}< \varphi <\pi \).

Thus \(\max \{\sin \varphi , 1, -\cos \varphi , \sin \varphi -\cos \varphi -1\} = 1\). Similarly, \(\min \{2, 1+\sin \varphi ,1 -\cos \varphi , \sin \varphi -\cos \varphi \} = \sin \varphi - \cos \varphi \). Hence the inequalities (4.7)–(4.10) hold if and only if

$$\begin{aligned} 1 \le a\cos \varphi - b \sin \varphi -n < \sin \varphi - \cos \varphi . \end{aligned}$$

Multiplying by 2 and adding \(-\sin \varphi +\cos \varphi -1\) we obtain

$$\begin{aligned} 1+ \cos \varphi -\sin \varphi \le (2a+1)\cos \varphi - (2b+1) \sin \varphi -2n-1 < \sin \varphi - \cos \varphi -1. \end{aligned}$$

Performing the analogous computation for m we get that \(a,b,m\in {\mathbb Z}\) satisfy the requirements if and only if

$$\begin{aligned} 1+ \cos \varphi -\sin \varphi \le (2a+1)\sin \varphi - (2b+1) \cos \varphi -2m-1 < \sin \varphi - \cos \varphi -1. \end{aligned}$$

As \(\sin \varphi >0\) and \(\cos \varphi <0\) we have \(\sin \varphi - \cos \varphi -1>0\), hence \(1- \sin \varphi + \cos \varphi <0\), thus we may apply Lemma 2.2 to the last system of inequalities, which completes the proof in the second case,

Case 3: \(\pi< \varphi < \frac{3\pi }{2}\). Then by Lemma 4.1\(A_{\varphi }(a,b)\in T_{(n,m+1)}, A_{\varphi }(a,b+1)\in T_{(n+1,m)}, A_{\varphi }(a+1,b)\in T_{(n-1,m)}, A_{\varphi }(a+1,b+1)\in T_{(n,m-1)}\). The same computation as in Cases 1 and 2 leads to the system of inequalities

$$\begin{aligned} 1+ \sin \varphi + \cos \varphi&\le (2a+1)\cos \varphi - (2b+1) \sin \varphi -2n-1< -\sin \varphi - \cos \varphi -1\\ 1+ \sin \varphi + \cos \varphi&\le (2a+1)\cos \varphi + (2b+1) \sin \varphi -2m-1 < -\sin \varphi - \cos \varphi -1 \end{aligned}$$

As \(\sin \varphi , \cos \varphi ,1+ \sin \varphi + \cos \varphi <0\) we have \(-\sin \varphi - \cos \varphi -1>0\) and we can apply Lemma 2.2 again.

Case 4: \(\frac{3\pi }{2}< \varphi < 2\pi \). Then by Lemma 4.1\(A_{\varphi }(a,b)\in T_{(n-1,m)}, A_{\varphi }(a,b+1)\in T_{(n,m+1)}, A_{\varphi }(a+1,b)\in T_{(n,m-1)}, A_{\varphi }(a+1,b+1)\in T_{(n+1,m)}\). The same computation as in Cases 1 and 2 leads to the system of inequalities

$$\begin{aligned} 1+ \sin \varphi - \cos \varphi&\le (2a+1)\cos \varphi - (2b+1) \sin \varphi -2n-1< -\sin \varphi + \cos \varphi -1\\ 1+ \sin \varphi - \cos \varphi&\le (2a+1)\cos \varphi + (2b+1) \sin \varphi -2m-1 < \sin \varphi - \cos \varphi -1 \end{aligned}$$

As \(\sin \varphi , -\cos \varphi ,1+ \sin \varphi - \cos \varphi <0\) we have \(-\sin \varphi + \cos \varphi -1>0\) and we can apply Lemma 2.2 again, which completes the proof of the theorem. \(\square \)

5 Orbits with short periodicity

Our first goal was to study the periodicity of the orbits of \(r_{\varphi }\), which seems to be very difficult. As a first step we examined some other properties of \(r_{\varphi }\), but did not forget the ultimate goal. In this section we present a small finding, which corresponds to \(\varphi =\frac{\pi }{4} \). We show that there are infinitely many \(a\in {\mathbb Z}\), such that the orbit of \(r_{\varphi }\) generated by (a, 0) is periodic of length 8, i.e.

$$\begin{aligned} r_{\varphi }^8(a,0)=(a,0). \end{aligned}$$

Nevertheless we could present other examples, but this already shows that we do not have yet the necessary technique to prove much more general results.

In the next lemma we collected those identities, which are necessary to prove our periodicity result. Their proofs are one step direct computation. We denote, as usual in these notes, the fractional part of x by \(\{x\}.\)

Lemma 5.1

Let \(a\in {\mathbb Z}\) and set \(\omega =\lfloor \frac{1}{\sqrt{2}}a\rfloor \). Suppose \(\lfloor \sqrt{2}\omega \rfloor =a-1 \). Then

$$\begin{aligned}&\left\lfloor -\frac{1}{\sqrt{2}}a+\frac{1}{\sqrt{2}}\right\rfloor =-\omega \end{aligned}$$
(5.1)
$$\begin{aligned}&\left\lfloor \frac{1}{\sqrt{2}}a-\frac{1}{\sqrt{2}}\right\rfloor ={\left\{ \begin{array}{ll} \omega , &{}\text {if } a=1, \\ \omega -1, &{}\text {otherwise}, \end{array}\right. } \end{aligned}$$
(5.2)
$$\begin{aligned}&\left\lfloor \frac{1}{\sqrt{2}}a+\frac{1}{\sqrt{2}}\right\rfloor ={\left\{ \begin{array}{ll} \omega , &{}\text {if } \{\frac{1}{\sqrt{2}}a\}< 1-\frac{1}{\sqrt{2}}, \\ \omega +1, &{}\text {if } \{\frac{1}{\sqrt{2}}a\}\ge 1-\frac{1}{\sqrt{2}}, \end{array}\right. } \end{aligned}$$
(5.3)
$$\begin{aligned}&\left\lfloor -\frac{1}{\sqrt{2}}a+\sqrt{2}\right\rfloor ={\left\{ \begin{array}{ll} -\omega , &{}\text {if } \{\frac{1}{\sqrt{2}}a\}> \sqrt{2}-1, \\ -\omega +1, &{}\text {if } \{\frac{1}{\sqrt{2}}a\}\le \sqrt{2}-1, \end{array}\right. } \end{aligned}$$
(5.4)
$$\begin{aligned}&\left\lfloor \sqrt{2}\omega +\sqrt{2}\right\rfloor ={\left\{ \begin{array}{ll} a, &{}\text {if } \{\sqrt{2}\omega \} +\{\sqrt{2}\}<1, \\ a+1, &{}\text {if } \{\sqrt{2}\omega \} +\{\sqrt{2}\}\ge 1, \end{array}\right. } \end{aligned}$$
(5.5)
$$\begin{aligned}&\left\lfloor -\sqrt{2}\omega +\frac{1}{\sqrt{2}}\right\rfloor ={\left\{ \begin{array}{ll} -a, &{}\text {if } \{\sqrt{2}\omega \} > \frac{1}{\sqrt{2}},\\ -a+1, &{}\text {if } \{\sqrt{2}\omega \} \le \frac{1}{\sqrt{2}}. \end{array}\right. } \end{aligned}$$
(5.6)

Theorem 5.2

Let \(a\in {\mathbb Z}\), \(\omega =\lfloor \frac{1}{\sqrt{2}}a\rfloor \) and suppose \(\lfloor \sqrt{2}\omega \rfloor = a-1.\) If \(\{\frac{1}{\sqrt{2}}a\}\in \left[ 1-\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}\right] \), then \(r_{\varphi }^8 (a,0)=(a,0) \). There exist infinitely many \(a\in {\mathbb Z}\) satisfying the assumptions.

Proof

First we prove that the assumptions imply \(\{\sqrt{2}\omega \}\in \left[ 1-\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}\right] \). Indeed, \([\sqrt{2}\omega ] = a-1\) means \(a-1 \le \sqrt{2}\omega <a\) (equality is only possible if \(a=1\)), hence \(0< \frac{a}{\sqrt{2}} -\omega <\frac{1}{\sqrt{2}}\). Further \(\{\frac{1}{\sqrt{2}}a\}\in \left[ 1-\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}\right] \) is equivalent to the sequence of inequalities

$$\begin{aligned} 1- \frac{1}{\sqrt{2}}&< \frac{a}{\sqrt{2}} - \omega< \frac{1}{\sqrt{2}},\\ -\frac{1}{\sqrt{2}}&< \sqrt{2}\omega - a< -1 + \frac{1}{\sqrt{2}},\\ 1- \frac{1}{\sqrt{2}}&< \sqrt{2}\omega -(a-1)< \frac{1}{\sqrt{2}}, \end{aligned}$$

which proves the claim.

Now we prove the second assertion. As \(\sqrt{2}\) is irrational, the sequence \(\left\{ \frac{a}{\sqrt{2}}\right\} \) is uniformly distributed by Theorem 2.1, thus there are infinitely many \(a\in {\mathbb Z}\) satisfying \(\{\frac{1}{\sqrt{2}}a\}\in \left[ 1-\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}\right] \).

Now we turn to prove the first assertion. It is obvious that \(r_{\varphi }(a,0)=(\omega ,\omega ) \). Further by the assumption \(\lfloor \sqrt{2}\omega \rfloor = a-1\) we have \(r_{\varphi }^2(a,0)=(0,a-1) \). Moreover, we have \(r_{\varphi }^3(a,0)=r_{\varphi }(0,a-1)=(\lfloor -\frac{1}{\sqrt{2}}a+\frac{1}{\sqrt{2}}\rfloor , \lfloor \frac{1}{\sqrt{2}}a-\frac{1}{\sqrt{2}}\rfloor ) \). Thus by equations (5.1) and (5.2) we get \(r_{\varphi }^3=(-\omega ,\omega -1) \). Then, by equation (5.6) we have \(r_{\varphi }^4(a,0)=(-a+1,-1) \). After that we get \(r_{\varphi }^5(a,0)=(-\omega +1,-\omega -1)\) by equation (5.4). Then \(r_{\varphi }^6(a,0)=(1,-a) \). Further we get by equations (5.1) and (5.3) \(r_{\varphi }^7(a,0)=(\omega +1,-\omega -1) \). Finally, using equation (5.5) we have \(r_{\varphi }^8(a,0)=r_{\varphi }(\omega +1,-\omega -1)=(\lfloor \sqrt{2}\omega + \sqrt{2}\rfloor ,0)=(a,0).\) \(\square \)

Remark 5.3

There exist infinitely many natural numbers a, which fulfill the conditions in Theorem 5.2, therefore there are infinitely many orbits with short periodicity.

We only give one class of starting points for the rotation by \(45^{\circ }\) in order to achieve periodicity of 8. There may exist many other starting points with the same periodicity.

6 Remarks on \({{\,\mathrm{ROUND}\,}}\circ A_{\varphi }\)

Following the proofs of Theorems 3.1 and 4.2 one can prove similar statements for the function \({{\,\mathrm{ROUND}\,}}\circ A_{\varphi }\). To perform such a project one has to adjust Lemma 2.2 according the new rounding function. This is straightforward if one of \(\cos \varphi \) and \(\sin \varphi \) is irrational, but needs some computation otherwise. To save space we leave this to the interested reader.