#
Bijective, Non-Bijective and Semi-Bijective Translations on the Triangular Plane^{ †}

^{1}

^{2}

^{*}

^{†}

## Abstract

**:**

## 1. Introduction

## 2. Preliminaries

#### 2.1. Discrete Translations

- surjective if $\forall i\in E$ in the target, there is at least one element ${i}^{\prime}\in E$ in the domain, such that $f\left({i}^{\prime}\right)=i$.
- injective if $\forall a,b\in E$ in the domain, whenever $f\left(a\right)=f\left(b\right)$ then a = b. Formally:$$\forall a,b\in E,f\left(a\right)=f\left(b\right)\u27f9a=b.$$
- bijective if it is both injective and surjective.

#### Translations on the Traditional Grid

_{x}, t

_{y}) $\in $ ${\mathbb{R}}^{2}$ in the two-dimensional Euclidean space, i.e., in the plane is the function f ${\mathbb{R}}^{2}$ → ${\mathbb{R}}^{2}$ such that f(x, y) = (x + t

_{x}, y + t

_{y}). On the square grid, discrete translations are defined analogously, but changing the domain and the target of the function f to ${\mathbb{Z}}^{2}$. Moreover, usually not only integer translation vectors are allowed, but any vector t(t

_{x}, t

_{y}) $\in $ ${\mathbb{R}}^{2}$ and, then a rounding operator is used for both coordinates to assign the closest gridpoint to the resulting point. Analogously, (t

_{x}, t

_{y}) = (x

_{0}, y

_{0}) + (x

_{1}, y

_{1}), where (x

_{0}, y

_{0}) is the integer vector to the closest gridpoint to t, and (x

_{1}, y

_{1}) is the fractional vector within the grid-square where $-0.5\le {x}_{1},{y}_{1}0.5$. Then the rounding operator will be defined by the help of the floor function:

#### 2.2. Notions and Notations on the Triangular Grid

## 3. Translations on the Triangular Grid

**Definition**

**1.**

#### 3.1. “Integer” + “Fractional” Vectors

_{x}, t

_{y})$\text{}\in $ ${\mathbb{R}}^{2}$, we draw it and consider it in a way that we fix its starting point to the grid origin, which is an even midpoint. Then, moreover, we write t as a sum of two vectors, the so-called integer and fractional vectors making some analogy to the traditional grid case. The integer vector will start at the grid origin and end at the closest even midpoint (technical details about this are discussed in the next subsection) to the endpoint of the original translation vector t. On the other hand, the fractional vector will start from the endpoint of the integer vector and end at the endpoint of the original translation vector t, and t

_{1}is the “fractional” vector.

_{0}= $\left({t}_{{x}_{0}},{t}_{{y}_{0}}\right),$ shown with the longer broken arrow is the integer translation vector which has its endpoint at the nearest even midpoint to the endpoint of t. While t

_{1}, the other broken arrow in the figure, represents the fractional vector that starts at the endpoint of t

_{0}and ends at the endpoint of t. We can write the translation vector t as: $\left({t}_{x},\text{}{t}_{y}\right)=\left({t}_{{x}_{0}},{t}_{{y}_{0}}\right)+\left({t}_{{x}_{1}},{t}_{{y}_{1}}\right)$, where $\left({t}_{{x}_{0}},{t}_{{y}_{0}}\right)$ is the integer part of the translation vector and $\left({t}_{{x}_{1}},{t}_{{y}_{1}}\right)$ is the fractional part of the translation vector. The integer vector maps the grid into itself. Consequently, the fractional part of the translation vector, t

_{1}, would give the same type (i.e., bijective or not) of translation as the original translation vector t would give.

_{1}(see Figure 5).

#### 3.2. Rounding the Border Points

- (1)
- Every corner point is mapped to the nearest even midpoint which has the maximal x coordinate value among the pixels sharing this corner point.
- (2)
- For points which are not corner points, we have the following strategy:
- (3)
- Every non-corner point on the ‘/’ direction (brown) border lines is mapped to the nearest even midpoint.
- (4)
- Every non-corner point on the ‘\’ direction (purple) border lines is mapped to the nearest odd midpoint.
- (5)
- Every point on the horizontal (green) border lines that is not a corner is mapped to the nearest even midpoint.
- (6)
- For the sake of completeness, we also give the assignment for all other points:
- (7)
- Finally, every point (x, y) which is not on the borders should be mapped to its nearest midpoint based on their distances.

## 4. Main Results: Characterizing Strongly Bijective, Semi-Bijective, and Non-Bijective Translation Vectors

_{i}(green) where i = 1…6; whereas the translation is bijective if and only if the fractional part of the translation vector ends in any of

**B**(the yellow) or ${B}_{{o}_{i}}$ (the blue) regions. There is no other case. Therefore, translation by a specific vector (see, e.g., the red arrows in Figure 4) would lead to bijective transformation (e.g., Figure 4, left) or non-bijective transformation (e.g., Figure 4, right) based on the position of its endpoint.

_{e}#### 4.1. Vectors of Bijective Translations

**B**and B

_{e}_{o}based on their locations in the even triangle Δ, or in an odd triangle $\nabla $, respectively. These bijective translation regions are described as follows. In an even triangle, consider a regular hexagon

**B**with a side length of $1/3$ and its center point is the even midpoint. While in the odd triangles, consider the six obtuse-angled triangles ${B}_{{o}_{i}}$ (i = 1…6) as shown in Figure 7. Instead of proving the bijectivity of these cases with common proof here, we show that the two types of regions, although in both cases the translations are bijective, have very different behavior. We define and differentiate strongly and semi-bijective translations:

_{e}**Definition**

**2.**

_{i}be the midpoint of its neighbors where i = 1…3. Let a and a

_{i}be mapped to${D}_{\tau}$(a) and ${D}_{\tau}$(a

_{i}), respectively (where ${D}_{\tau}$(a) and${D}_{\tau}$(a

_{i}) are the digitized translated midpoints of a and its neighbors a

_{i}). If the neighbor relations between a and a

_{i}are kept preserved after the translation, i.e., if ${D}_{\tau}$(a) and ${D}_{\tau}$(a

_{i}) are also neighbors for each i = 1…3, then the translation is strongly bijective.

**Definition**

**3.**

_{i}be the midpoints of its neighbors where i = 1…3. Let a and a

_{i}be mapped to${D}_{\tau}$(a) and ${D}_{\tau}$(a

_{i}), respectively. If the translation is bijective, but the neighborhood is not preserved, (i.e., there is a neighbor a

_{i}of a such that ${D}_{\tau}$(a) and ${D}_{\tau}$(a

_{i}) are not neighbors), then the translation is called semi-bijective.

#### 4.1.1. Characterizing Strongly Bijective Translations

**Proposition**

**1.**

**Proof.**

**B**. By Equation (7) we do it as a union of three smaller pairwise disjoint regions. Notice that in some conditions sharp inequality is used, while in some others, equality is also allowed (See Figure 7).

_{e}**Theorem**

**1.**

_{x}, t

_{y}) is strongly bijective if and only if$\left({t}_{{x}_{1}},{t}_{{y}_{1}}\right)$ends at the region

**B**, where$\left({t}_{x},{t}_{y}\right)=\left({t}_{{x}_{0}},{t}_{{y}_{0}}\right)+\left({t}_{{x}_{1}},{t}_{{y}_{1}}\right)$with integer vector$\left({t}_{{x}_{0}},{t}_{{y}_{0}}\right)$and fractional vector t

_{e}_{1}=$\left({t}_{{x}_{1}},{t}_{{y}_{1}}\right).$

**Proof.**

**B**preserves the parity of the pixels. Without loss of generality, consider

_{e}**B**(the yellow) and ${\mathit{B}}_{\mathit{e}}^{\mathbf{\prime}}$ (the blue) isometric regular hexagons within the area of the even and odd triangles, respectively, in Figure 8. Here, m (the red) and n (the yellow) points are the midpoints of the even and odd triangles, respectively.

_{e}_{1}in

**B**, then the midpoint of an even pixel m (e.g., the red point) is translated into region

_{e}**B**around a midpoint of an even pixel as it is shown in Figure 8. By our rounding operator, one can see that the parity of each even pixel is preserved; the points in

_{e}**B**belong to an even triangle.

_{e}_{1}in

**B**implies that the midpoint of the odd pixel n (e.g., the yellow point) is translated to a point belonging to region ${\mathit{B}}_{\mathit{e}}^{\mathbf{\prime}}$ (Figure 8). However, by the rounding operator, it is clear that these points are mapped to n (the yellow point), i.e., to the midpoint of an odd pixel. Therefore, the parity of the original pixel is exactly the same as the parity of its image after the translation. The proof is finished. □

_{e}#### 4.1.2. Characterizing Semi-Bijective Translations

**Proposition**

**2.**

_{x}, t

_{y}) = t

_{0}+ t

_{1}is mapping every pixel to an opposite type pixel if and only if the fractional vector t

_{1}=$\left({t}_{{x}_{1}},{t}_{{y}_{1}}\right)$ends in a region${B}_{{o}_{i}}$where i = 1…6.

**Proof.**

_{1}belonging to region ${\mathit{B}}_{{\mathit{o}}_{\mathbf{1}}}$, then the midpoint of an even pixel m (e.g., the red point) is translated into region ${\mathit{B}}_{{\mathit{o}}_{\mathbf{1}}}$ inside an odd pixel as it is shown in Figure 9. By our rounding operator, one can see that the parity of each even pixel is changed to odd; the points in ${\mathit{B}}_{{\mathit{o}}_{\mathbf{1}}}$ belong to an odd triangle. On the other hand, the translation of an odd pixel by a vector with fractional part t

_{1}belonging to ${\mathit{B}}_{{\mathit{o}}_{\mathbf{1}}}$ implies that the midpoint of the odd pixel n (e.g., the yellow point) is translated to a point belonging to region ${\mathit{B}}_{{\mathit{o}}_{\mathbf{1}}}^{\mathbf{\prime}}$ (Figure 9). However, by applying the rounding operator on the edges, it is clear that these points are mapped to the midpoint of an even pixel (${m}^{\prime}$). Therefore, the parity of the original pixel is opposite to the parity of its image after the translation.

**Theorem**

**2.**

_{x}, t

_{y}) = t

_{0}+ t

_{1}is a semi-bijective mapping if and only if the fractional vector t

_{1}=$\left({t}_{{x}_{1}},{t}_{{y}_{1}}\right)$ends in a region${B}_{{o}_{i}}$where i = 1…6.

**Proof.**

**B**(the yellow) region refers to the strongly bijective transitions, while ${B}_{{o}_{i}}$ where i = 1…6, (the blue) regions specify the semi-bijective translations (in Figure 7). Based on Proposition 2 and Theorem 2, we can say that a translation is semi-bijective if and only if it is a bijective translation and it maps the elements of O (i.e., the odd points) to E (i.e., even points) and vice versa.

_{e}#### 4.2. Characterizing the Non-Bijective Translation Vectors

**Proposition**

**3.**

**Proof.**

_{i}where i = 1…6 (the green regions in Figure 7), points without pre-image (holes) and also points with two pre-images occur. Hence, these are non-bijective translations (see Figure 4, right, for an example).

_{i}where i = 1…6 (the green regions in Figure 7), will be categorized into two groups. The odd and even groups are based on the base odd $\nabla $ and even Δ triangles in which these green triangles are located. Remember that the translation vectors in our description start at the midpoint of an even triangle (e.g., the origin), and we deal with its fractional part.

_{i}in each odd and even triangle, they are denoted by

**N**,

_{1}**N**, and

_{3}**N**for the odd triangle, and

_{5}**N**,

_{2}**N**, and

_{4}**N**for the even triangle (as Figure 7 shows both cases). To simplify their mathematical description, each of them is split into two symmetrical parts L

_{6}_{i}and R

_{i}, where i = 1…6, as their left and right parts (Figure 7). Equations (14)–(19) describe them as follows. Let (a, b) denote the coordinate pair of the midpoint of the even pixel from where the fractional vector starts (denoted by the red circle in Figure 7).

**Theorem**

**3.**

_{0}(x

_{0}, y

_{0}) + t

_{1}(x

_{1}, y

_{1}) where t

_{0}is the integer vector and t

_{1}is the fractional vector of the translation such that this latter one starts at the endpoint of t

_{0}and ends at a region N

_{i}where i = 1…6.

**Proof.**

_{1}belonging to region N

_{i}where i = 1…6, will map every pixel to the same type of pixel. Without loss of generality, consider the regions

**N**(green) and ${\mathit{N}}_{\mathbf{1}}^{\mathbf{\prime}}$ (gray) in Figure 11. They are, in fact, isometric regular triangles within the area of an odd triangle. Points m (red) and n (yellow) denote the midpoints of the corresponding even and odd triangles, respectively.

_{1}_{1}in

**N**, then the midpoint of an even pixel (e.g., the red point m) is translated into the region

_{1}**N**around n; the midpoint of an odd pixel as it is shown in Figure 11. By our rounding operator, one can see that the parity of each even pixel is not preserved since the points in

_{1}**N**belong to an odd triangle. On the other hand, the translation of an odd pixel by a vector t with fractional part t

_{1}_{1}in

**N**implies that the midpoint of the odd pixel n (e.g., the yellow point in Figure 11) is translated to a point belonging to region ${\mathit{N}}_{\mathbf{1}}^{\mathbf{\prime}}$. However, by the rounding operator, it is clear that these points are mapped again to the midpoint of the odd pixel, i.e., point n. Therefore, both even and odd points are mapped to odd points in this case. The proof is similar for other regions, in fact, for regions

_{1}**N**,

_{1}**N**, and

_{3}**N**, the translation maps every pixel to odd and for regions

_{5}**N**,

_{2}**N**, and

_{4}**N**it maps every point to even pixels. □

_{6}## 5. Conclusions

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## References

- Klette, R.; Rosenfeld, A. Digital geometry: Geometric methods for digital picture analysis. In Morgan Kaufmann; Elsevier: San Francisco, CA, USA, 2004; Volume I-XVIII, pp. 1–656. ISBN 978-1-55860-861-0. [Google Scholar]
- Kaufman, A. Voxels as a computational representation of geometry. Presented at the SIGGRAPH’99—Course 29, Los Angeles Convention Center, Los Angeles, CA, USA, 8–13 August 1999; pp. 14–58. [Google Scholar]
- Pluta, K.; Romon, P.; Kenmochi, Y.; Passat, N. Bijective Digitized Rigid Motions on Subsets of the Plane. J. Math. Imaging Vis.
**2017**, 59, 84–105. [Google Scholar] [CrossRef] - Nagy, B. Isometric transformations of the dual of the hexagonal lattice. In Proceedings of the 6th IEEE International Symposium on Image and Signal Processing and Analysis, ISPA, Salzburg, Austria, 16–18 September 2009; pp. 432–437. [Google Scholar]
- Pluta, K.; Romon, P.; Kenmochi, Y.; Passat, N. Bijective rigid motions of the 2D Cartesian grid. In DGCI 2016: Discrete Geometry for Computer Imagery; Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2016; Volume 9647, pp. 359–371. [Google Scholar]
- Rosenfeld, A. Continuous functions on digital pictures. Pattern Recognit. Lett.
**1986**, 4, 177–184. [Google Scholar] [CrossRef] - Nagy, B. Characterization of digital circles in triangular grid. Pattern Recognit. Lett.
**2004**, 25, 1231–1242. [Google Scholar] [CrossRef] - Nagy, B.; Moisi, E.V. Memetic algorithms for reconstruction of binary images on triangular grids with 3 and 6 projections. Appl. Soft Comput.
**2017**, 52, 549–565. [Google Scholar] [CrossRef] - Kardos, P.; Palágyi, K. Topology preservation on the triangular grid. Ann. Math. Artif. Intell.
**2015**, 75, 53–68. [Google Scholar] [CrossRef] - Kardos, P.; Palágyi, K. Unified Characterization of P-Simple Points in Triangular, Square, and Hexagonal Grids. In Computational Modeling of Objects Presented in Images. Fundamentals, Methods, and Applications, Proceedings of the International Symposium Computational Modeling of Objects Represented in Images, Niagara Falls, NY, USA, 21–23 September 2016; Springer: Cham, Switzerland, 2017; Volume 10149, pp. 79–88. [Google Scholar]
- Abuhmaidan, K.; Nagy, B. Non-bijective translations on the triangular plane. In Proceedings of the IEEE 16th World Symposium on Applied Machine Intelligence and Informatics (SAMI 2018), Kosice, Slovakia, 7–10 February 2018; pp. 183–188. [Google Scholar]
- Mazo, L.; Baudrier, É. Object digitization up to a translation. J. Comput. Syst. Sci.
**2018**, 95, 193–203. [Google Scholar] [CrossRef][Green Version] - Nagy, B. An algorithm to find the number of the digitizations of discs with a fixed radius. Electron. Notes Discret. Math.
**2005**, 20, 607–622. [Google Scholar] [CrossRef] - Avkan, A.; Nagy, B.; Saadetoglu, M. Digitized Rotations of Closest Neighborhood on the Triangular Grid. In Combinatorial Image Analysis, Proceedings of the 19th International Workshop, (IWCIA 2018), Porto, Portugal, 22–24 November 2018; Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2018; Volume 11255, pp. 53–67. [Google Scholar]
- Avkan, A.; Nagy, B.; Saadetoglu, M. Digitized Rotations of 12 Neighbors on the Triangular Grid. Ann. Math. Artif. Intell.
**2019**. accepted. [Google Scholar]

**Figure 1.**The square, hexagonal and triangular grids. Midpoints of the pixels represent their gridpoints. Any grid-vector translates the square and hexagonal grids to themselves, respectively. However, it is not the case in the triangular grid.

**Figure 2.**A translation on the square grid (by the vector represented by the broken arrow). The centers (blue points) represent the original gridpoints, while the red ones are the translated ones. On the right, it is also shown how to deal with points on the edges and on the corners. In the next subsection, some basics of the triangular grid will be recalled.

**Figure 3.**Side-length and height of triangle pixels at the triangular grid. The midpoints of the pixels are also marked. The even midpoint shown is the origin of the grid.

**Figure 4.**A bijective and a non-bijective translation left and right, respectively. The translation vector is shown. In the case of non-bijective translation, two distinct points have the same image and there are pixels that do not correspond to any original pixel.

**Figure 5.**A translation vector t is considered as the sum of two vectors; t

_{0}is the “integer” vector, and t

_{1}is the “fractional” vector.

**Figure 7.**An even pixel with its three closest neighbors. The hexagon region

**B**(in yellow color) with its orange borders is referred to as the strongly-bijective translation region, whereas the six obtuse-angle triangles ${B}_{{o}_{i}}$ where i = 1…6 (in blue color with its dark blue borders) are referred to as the semi-bijective translation regions. The six equilateral triangles ${N}_{i}$ where i = 1…6 (in green color with its dark green borders) are referred to as the non-bijective translation regions (the starting point of the fractional part of the translation vector is at the even midpoint (m)).

_{e}**Figure 8.**Any translation vector that starts at the even midpoint (m) and ends within the hexagonal region (

**B**) will produce a strongly-bijective translation. The orange- and blue-colored borders belong to

_{e}**B**and ${\mathit{B}}_{\mathit{e}}^{\mathbf{\prime}}$ regions respectively, while the gray-colored borders belong to other regions.

_{e}**Figure 9.**Translations with fractional vectors that start at the even midpoint (m) and end at regions ${B}_{{o}_{i}}$ (where i = 1…6, the blue colored regions with their dark blue colored borders) will produce semi-bijective translations.

**Figure 10.**(

**a**) An even pixel and its neighbors, the three odd pixels, before translation. (

**b**) A translation by a vector that belongs to the semi-bijective region ${\mathit{B}}_{{\mathit{o}}_{\mathbf{1}}}$. (

**c**) The result of the translation: ${m}^{\prime},{n}_{1}^{\prime},{n}_{2}^{\prime},\mathrm{and}{n}_{3}^{\prime}$ are the images of $m,{n}_{1},{n}_{2},\mathrm{and}{n}_{3}$ respectively. The pixels ${m}^{\prime}$ and ${n}_{2}^{\prime}$ are not neighbors.

**Figure 11.**A translation to a non-bijective region N

_{i}. Image of an even and of an odd pixel (with the corresponding regions ${N}_{i}^{\prime}$. where i = 1…6) is shown.

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Abuhmaidan, K.; Nagy, B. Bijective, Non-Bijective and Semi-Bijective Translations on the Triangular Plane. *Mathematics* **2020**, *8*, 29.
https://doi.org/10.3390/math8010029

**AMA Style**

Abuhmaidan K, Nagy B. Bijective, Non-Bijective and Semi-Bijective Translations on the Triangular Plane. *Mathematics*. 2020; 8(1):29.
https://doi.org/10.3390/math8010029

**Chicago/Turabian Style**

Abuhmaidan, Khaled, and Benedek Nagy. 2020. "Bijective, Non-Bijective and Semi-Bijective Translations on the Triangular Plane" *Mathematics* 8, no. 1: 29.
https://doi.org/10.3390/math8010029