## 2 Orbit Trap Method
\begin{cases}\begin{bmatrix}-x\\ y\\ x\\ -y\end{bmatrix}&\text{for p3m1 symmetry,}\\ \text{for p31m, p6m symmetries.}\end{cases} \] (9)  
The next thing that we need in the method are the orbit traps. [PERSON] et al. in [17] defined four orbit traps that were based on circles. We present them in Figure 1. The centres \(c_{i}\) and the radii \(r_{i}\) for the circles in each case are the following:  
* \(c_{0}\ =\ [0,0]^{T},r_{0}\ =\ 3.5\),
* \(c_{0}\ =\ [-3.5,-2]^{T},c_{1}\ =\ [3.5,-2]^{T},c_{2}\ =\ [0,-2+3.5\sqrt{3}]^{T},r_{0}\ =\ r_{1}\ =\ r_{2}\ =\ 3.5\),
* \(c_{0}\ =\ [-3.5,3.5]^{T},\ c_{1}\ =\ [3.5,3.5 The points in the orbit trap should be coloured according to some colour map. In [17], a method for generating colour maps that is based on an exponential function was proposed. In this method, we have a set of base colours \(\{b_{0},b_{1},\ldots,b_{N}\}\), and for each of the base colours we assign a colour ratio \(q_{i}\in[0,1]\) for \(i\ =\ 0,1,\ldots,N\) such that \(q_{0}<q_{1}<\ldots<q_{N}\). Moreover, we give the number of colours \(N_{c}\) in the colour map. The method for generating the colour map is presented in Algorithm 1. ```
Input:\(\{b_{0},b_{1},\ldots,b_{N}\}\)--base colours; \(\{q_{0},q_{1},\ldots,q_{N}\}\)--colour ratios such that \(q_{0}<q_{1}<\ldots<q_{N}\); \(N_{c}\)--the number of colours in the resulting colour map; \(E\)--exponent. Output:\(colour\)Table--colour map. 1\(colour\)Table = empty array with \(N_{c}\) elements \(k\ =\ 1\) for\(i\ =\ 0,1,\ldots,N_{c}-1\)do \(q\ =\ \left(\frac{i}{1+i}\right)^{E}\) while\(q>q_{k}\)do \(k\ =\ k+1\) \(t\ =\ \frac{q_{k}-q}{q_{k}-q_{k-1}}\) colourTable\([i]\ =\ tb_{k-1}+(1-t)b_{k}\)
```  
**Algorithm 1**Colour map generation. The pseudocode of the method introduced by [PERSON] et al. in [17] is presented in Algorithm 2. In this algorithm, the following notation \(p_{i,x}\) and \(p_{i,y}\) is used to denote the \(x\) and \(y\) coordinates of a point \(p_{i}\). Moreover, \(f\) is one of the functions given by (1) or (7) or (8). [PERSON] et al. in their paper set \(x_{min}\ =\ y_{min}\ =\ -2\pi\), \(x_{max}\ =\ y_{max}\ =\ 2\pi\) for most of their examples. When using the orbit trap method from Algorithm 2 to generate patterns with wall-paper symmetry, we need to point out one thing that was not mentioned in [17]. Namely, the symmetry type of \(f\) does not implicate that the generated pattern will be of the same symmetry type. We need to select a proper combination of the orbit traps and the type of the function \(f\) to get a desired symmetry type. In Section 4, we will present an example showing how the combination of the orbit traps and the function \(f\) affects the resulting pattern and changes its symmetry type. Figure 1: Orbit traps used in [17]. (**a**) one orbit trap; (**b**) three orbit traps; (**c**) four orbit traps; and (**d**) seven orbit traps. ```
Input:\(f:\mathbb{R}^{2}\rightarrow\mathbb{R}^{2}\)--mapping with the desired symmetry type; \(C_{0}\ =\ (c_{0},r_{0})\), \(C_{1}=(c_{1},r_{1}),\ldots,C_{n}\ =\ (c_{n},r_{n})\)--orbit traps, where \(c_{i}\) is the centre and \(r_{i}\) is the radius of the \(i\)th circle; \([x_{min},x_{max}]\times[y_{min},y_{max}]\)--area that should be drawn; colourTable--colour map with \(N_{c}\) colours generated using Algorithm 1; \(M\)--the maximum number of iterations; \(W\), \(H\)--the width and height of the image; \(E\)--exponent. Output: Image generated with the orbit trap method. 1 for\(x\ =\ 0,1,\ldots,W-1\)do
2 for\(y\ =\ 0,1,\ldots,H-1\)do
3\(x_{0}\ =\ x_{min}+(x_{max}-x_{min})\frac{x}{W-1}\)
4\(y_{0}\ =\ y_{min}+(y_{max}-y_{min})(1-\frac{y}{H-1})\)
5\(p_{0}\ =\ [x_{0},y_{0}]^{T}\)
6\(trapped\ =\ false\)
7 for\(k\ =\ 0,1,\ldots,M-1\)do
8\(p_{k+1}\ =\ f(p_{k})\)
9 for\(i\ =\ 0,1,\ldots,n\)do
10



where \(\alpha_{k}\in(0,1]\) and \(\beta_{k}\in[0,1]\) for all \(k\in\mathbb{N}\). Let us notice that the S-iteration reduces to the Picard iteration if \(\alpha_{k}\ =\ 1\) and \(\beta_{k}\ =\ 0\) for all \(k\in\mathbb{N}\).