## 2 Orbit Trap Method
\(c_{0}=[4,0]^{T}\), \(c_{1}=[-4,0]^{T}\), \(c_{2}=[0,4]^{T}\), \(c_{3}=[0,-4]^{T}\), \(r_{0}=r_{1}=r_{2}=r_{3}=2\sqrt{2}\),
3. \(c_{0}=[0,0]^{T}\), \(c_{1}=[-6,0]^{T}\), \(c_{2}=[6,0]^{T}\), \(c_{3}=[0,-6]^{T}\), \(c_{4}=[0,6]^{T}\), \(r_{0}=r_{1}=\ldots\), \(=r_{4}=3\). Figure 3 presents the new orbit traps obtained with the Euclidean metric. In Algorithm 3, we present the pseudocode for the modified version of the orbit trap method. We can implement this algorithm on the GPU (graphics processing unit) using shaders instead of the CPU (central processing unit) implementation presented in [17]. In the implementation, we render a quad that occupies the whole space in the window. Then, in the vertex shader, we calculate the coordinates of area corners and let the rasterizer calculate the coordinates of the starting point \(p_{0}\), which will be an input variable for the fragment shader. In the fragment shader, we make all the calculations that start from line 6 in the algorithm. Moreover, to enhance the quality of the generated pattern, we can use multisampling to perform the anti-aliasing that was not used in the original method presented in [17]. Figure 3: New orbit traps obtained with the Euclidean metric. (**a**) two orbit traps; (**b**) four orbit traps; and (**c**) five orbit traps. Figure 2: Circles with centre \([0,0]^{T}\) and radius 1 obtained with various metrics. (**a**) \(l_{p}\); (**b**) Chebyshev; and (**c**) Rickman. ```
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 which 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; \(d:\mathbb{R}^{2}\times\mathbb{R}^{2}\rightarrow[0,\infty)\)--metric; \(\alpha,\beta\in\mathbb{R}^{2}\)--parameters for the S-iteration. Output: Image generated with the modified 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\(u_{k}\ =\ ([1,0]^{T}-\beta)\cdot p_{k}+\beta\cdot f(p_{k})\)
9\(p_{k+1}\ =\ ([1,0]^{T}-\alpha)\cdot f(p_{k})+\alpha\cdot f(u_{k})\mod\ \ [2\pi,2\pi]^{T}\)
10 for\(i\ =\ 0,1,\ldots,n\)do
11\(d\ =\ d(p_{k+1},c_{i})\)
12 if\(d<r_{i}\)then
13\(trapped\ =\ true\)
14 break
15 if\(trapped\)then
16\(v\ =\ 10^{\log_{10}(\frac{d}{r_{i}})/E}\)
17\(index\ =\ \min(\frac{v}{1-v},N_{c}-1)\)
18 colour\((x,y)\) with colour \(colourTable[index]\)
19 break
20 if\(not\ trapped\)then
21 colour\((x,y)\) with colour \(colourTable[N_{c}-1]\)
```

**Algorithm 3**Modified orbit trap method. ## 4 Examples

In this section, we present some examples of patterns obtained using the modified orbit trap method presented in Section 3. In all examples, we use multisampling with eight samples per pixel to perform anti-alising for enhancing the quality of the generated patterns. The algorithm for generating the patterns was written in OpenGL Shading Language (GLSL). In the examples, we use four colour maps generated using Algorithm 1. The maps are presented in Figure 4, and the parameters used to generate them were the following: \(E\ =\ 16\), \(N_{c}\ =\ 3000\), and the base colours together with the colour ratios are gathered in Table 1.

Figure 4: Colour maps used in the examples. In Section 2, we mentioned about the proper combination of the orbit traps and the type of the function \(f\) in order to get the desired type of wallpaper symmetry. Thus, the first example presents this property. In the example, we generate patterns using the same function \(f\) but with various orbit traps that we introduced in Figures 1 and 3.