Next Article in Journal
Theoretical Study of the Efficient Ion Acceleration Driven by Petawatt-Class Lasers via Stable Radiation Pressure Acceleration
Previous Article in Journal
Removal of Emerging Contaminants as Diclofenac and Caffeine Using Activated Carbon Obtained from Argan Fruit Shells
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Procedural Generation of Artistic Patterns Using a Modified Orbit Trap Method

by
Krzysztof Gdawiec
1,* and
Hezekiah Adewinbi
2
1
Institute of Computer Science, University of Silesia, Bedzinska 39, 41-200 Sosnowiec, Poland
2
Department of Mathematical Sciences, Kent State University, Summit Street, Kent, OH 44242, USA
*
Author to whom correspondence should be addressed.
Appl. Sci. 2022, 12(6), 2923; https://doi.org/10.3390/app12062923
Submission received: 18 February 2022 / Revised: 8 March 2022 / Accepted: 10 March 2022 / Published: 13 March 2022
(This article belongs to the Section Computing and Artificial Intelligence)

Abstract

:
In the literature, we can find various methods for generating artistic patterns. One of the methods is the orbit trap method. In this paper, we propose various modifications of a variant of the orbit trap method that generates patterns with wallpaper symmetry. The first modification relies on replacing the Picard iteration (used in the original method) with the S-iteration known from the fixed point theory. Moreover, we extend the parameters in the S-iteration from scalar to vector ones. In the second modification, we replace the Euclidean metric used in the orbit traps with other metrics. Finally, we propose three new orbit traps. The presented examples show that using the proposed method, we are able to obtain a great variety of interesting patterns. Moreover, we show that a proper selection of the orbit traps and the mapping used by the method can lead to patterns that possess a local fractal structure.

1. Introduction

A pattern is a generic term for any type of repeated, often regular, arrangement [1]. It is also a design in which lines, shapes, forms, or colours are repeated. The repeated part is called a motif. A motif can be repeated and arranged in many ways to create different types of patterns. In regular patterns, the motif (or motifs) is repeated predictably [2]. It could be the same each time, or it could change in regularly repeating ways. Motifs can be arranged in many ways to create a regular pattern. An irregular pattern is one in which the motif changes or the way it is repeated is unpredictable [3]. How complicated a pattern is depends on what is repeated and the way in which it is repeated.
Before the invention of computers, patterns were generated by hand through drawings and many other skills. It takes a very long time to generate a single pattern, and sometimes, after all the labour, the pattern may not meet the requirements of the designer or the consumers. With the use of computers, it is easy to generate millions of different patterns in just a minute [4]. In a bid to satisfy human wants, researchers have found out that patterns can be generated using mathematical equations or artificial intelligence methods.
In the literature, we can find various methods for generating patterns that use mathematical equations. Among the methods, a popular approach is the use of fractals, e.g., inversion fractals [5] and Mandelbox [6]. Furthermore, other non-Euclidean geometries are used in the generation of patterns. For instance, in [7], the authors used spherical geometry, whereas in [8], hyperbolic geometry was used. In the generation of patterns, not only various types of non-Euclidean geometries are used. Mathematical objects such as whirls [9] or spirals [10,11] are commonly used in obtaining artistic patterns. Another group of methods are the methods that are based on the dynamics of discrete dynamical systems [12,13,14]. Not only the dynamics but also the orbits of discrete dynamical systems can generate aesthetic patterns [15]. Based on the results presented in [15] and the orbit trap method [16], Lu et al. in [17] introduced a method that is the main subject of this paper, namely, the orbit trap method that generates patterns with wallpaper symmetry.
In this paper, we introduce modifications of the orbit trap method presented by Lu et al. in [17]. The first modification relies on using the S-iteration [18] instead of the Picard one that is used in the original algorithm. We also extend the parameters in the S-iteration from scalar to vector ones. Moreover, we propose the use of various metrics for defining orbit traps and introduce some new orbit traps. Additionally, we present examples showing that we can obtain a local fractal structure in the generated pattern when using an appropriate mapping and orbit traps.
The paper is organised as follows. In Section 2, we briefly present the orbit trap method. Then, in Section 3, we introduce modifications to the orbit trap method from Section 2. Some examples showing the potential of the proposed modifications are presented in Section 4. Moreover, we present examples showing the local fractal structure of some of the patterns. Finally, in Section 5, we provide some concluding remarks and the directions for future work.

2. Orbit Trap Method

In [17], Lu et al. introduced a method for generating artistic images with wallpaper symmetries. The method was based on the mappings for which the chaotic attractor possesses a wallpaper symmetry [15] and the orbit trap method [16,19]. Moreover, they proposed a method for generating colour maps using an exponential function. In this section, we briefly present the method of Lu et al.
In general, in the method for each point in the considered area, we iterate a function starting from the point and check whether the transformed point falls into one of the orbit traps (orbit trap is a bounded area in the plane). When the point falls into one of the orbit traps, the point is considered to be trapped, and we end the iteration process. Next, a colour is assigned to the starting point based on the distance from the centre of the orbit trap to the trapped point. If the point is not trapped in the given number of iterations, then it gets a background colour.
To obtain images with wallpaper symmetry, we need to use a proper function that is iterated and some orbit traps. Lu et al. based their method on the functions introduced in [15]. Depending on the symmetry type, we need to use different functions.
For the symmetry type p2, pm, pg, cm, pmm, cmm, pmg, pgg, p4, p4m, and p4g, we use function f : R 2 R 2 of the following form [15]:
f x y = [ 1 , cos x , cos 2 x , sin x , sin 2 x ] P 00 P 04 P 40 P 44 · 1 cos y cos 2 y sin y sin 2 y mod 2 π 2 π ,
where P 00 , P 01 , , P 44 R 2 . In [15], Carter et al. derived conditions that the points P 00 , P 01 , , P 44 must satisfy to obtain each of the symmetry type. For completeness, we gather the conditions in Appendix A.
To define functions for the p3, p3m1, p31m, p6, and p6m symmetries, let us firstly define the vectors [15]:
v 0 = 1 1 3 , v 1 = 0 2 3 , v 2 = v 0 + v 1 ,
and the following mappings:  
R 3 x y = 1 2 3 2 3 2 1 2 x y ,
R 6 x y = 1 2 3 2 3 2 1 2 x y .
Let us note that R 3 is a counter-clockwise rotation by 120 , whereas R 6 is a counter-clockwise rotation by 60 .
Moreover, for k { 3 , 6 } , let us define [15]
g k ( p , v , G v ) = i = 0 k 1 R k i ( G v ) cos ( R k i ( v ) · p ) ,
h k ( p , v , H v ) = i = 0 k 1 R k i ( H v ) sin ( R k i ( v ) · p ) ,
where p , v , G v , H v R 2 , and · is the dot product.
For each of the v 0 , v 1 , v 2 vectors, let us arbitrarily select G v 0 , H v 0 , G v 1 , H v 1 , G v 2 , H v 2 R 2 , respectively. Now, for each of the p3, p3m1, p31m, p6, p6m symmetries, we define the f : R 2 R 2 function in the following way [15]:
  • p3 symmetry ( k = 3 ) and p6 symmetry ( k = 6 )
    f ( p ) = j = 0 2 g k ( p , v j , G v j ) + h k ( p , v j , H v j ) mod 2 π 2 π ,
  • p3m1 and p31m symmetries ( k = 3 ), and p6m symmetry ( k = 6 )
    f ( p ) = j = 0 2 g k ( p , v j , G v j ) + g k ( p , σ ( v j ) , σ ( G v j ) ) +   h k ( p , v j , H v j ) + h k ( p , σ ( v j ) , σ ( H v j ) ) mod 2 π 2 π ,
    where
    σ x y = x y for p 3 m 1 symmetry , x y for p 31 m , p 6 m symmetries .
The next thing that we need in the method are the orbit traps. Lu 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:
(a)
c 0 = [ 0 , 0 ] T , r 0 = 3.5 ,
(b)
c 0 = [ 3.5 , 2 ] T , c 1 = [ 3.5 , 2 ] T , c 2 = [ 0 , 2 + 3.5 3 ] T , r 0 = r 1 = r 2 = 3.5 ,
(c)
c 0 = [ 3.5 , 3.5 ] T , c 1 = [ 3.5 , 3.5 ] T , c 2 = [ 3.5 , 3.5 ] T , c 3 = [ 3.5 , 3.5 ] T , r 0 = r 1 = r 2 = r 3 = 3.5 ,
(d)
c 0 = [ 0 , 0 ] T , c 1 = [ 0 , 7 ] T , c 2 = [ 3.5 3 , 3.5 ] T , c 3 = [ 3.5 3 , 3.5 ] T , c 4 = [ 0 , 7 ] T , c 5 = [ 3.5 3 , 3.5 ] T , c 6 = [ 3.5 3 , 3.5 ] T , r 0 = r 1 = = r 6 = 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 , , b N } , and for each of the base colours we assign a colour ratio q i [ 0 , 1 ] for i = 0 , 1 , , N such that q 0 < q 1 < < 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.   
Algorithm 1: Colour map generation.
Applsci 12 02923 i001
The pseudocode of the method introduced by Lu 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). Lu et al. in their paper set x m i n = y m i n = 2 π , x m a x = y m a x = 2 π for most of their examples.
When using the orbit trap method from Algorithm 2 to generate patterns with wallpaper 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.  
Algorithm 2: Orbit trap method.
Applsci 12 02923 i002

3. Modifications of the Orbit Trap Method

When we look at Algorithm 2, we notice that it uses a feedback process of the following form:
p k + 1 = f ( p k ) for k = 0 , 1 , ,
where p 0 is a starting point. This type of feedback process is called the Picard iteration [20], and it is used in various algorithms, e.g., polynomial root-finding using numerical algorithms [21], generation of fractals [5,22], etc.
One of the most important applications of Picard’s iteration is finding the fixed points of a contractive mapping using Banach Fixed Point Theorem [20]. For instance, this application allows for the generation of fractals given by iterated function systems [23]. In fixed point theory, we can find many other iterations that are used to approximately find fixed points not only for contractive mapping but also for pseudo-contractive or non-expansive mappings [20]. We will modify the orbit trap method presented in Section 2 by replacing the Picard iteration with the so-called S-iteration, which was defined by Agarwal et al. in 2007 [18].
Let ( X , d ) be a metric space, T : X X be a mapping and p 0 X be a starting point. Then, the S-iteration is defined in the following way [18]:
p k + 1 = ( 1 α k ) T ( p k ) + α k T ( u k ) , u k = ( 1 β k ) p k + β k T ( p k ) ,
where α k ( 0 , 1 ] and β k [ 0 , 1 ] for all k N . Let us notice that the S-iteration reduces to the Picard iteration if α k = 1 and β k = 0 for all k N . Moreover, it reduces to the Picard–Mann iteration [24] if α k = 1 and β k 0 for all k N .
To use (11) in the orbit trap method, we need to specify a metric space and the mapping T. We take the metric space ( R 2 , d ) , where d is any metric in R 2 , and as the mapping, we take f : R 2 R 2 given by the formulas introduced in Section 2. In (11), we use sequences of parameters α k and β k , but for simplicity we will use constant sequences, i.e., α k = α and β k = β . The conditions about the range of the parameters in (11) were introduced in fixed point theory to obtain convergence to a fixed point of the mapping. In the orbit trap method, we are not interested in finding fixed points. Instead, we are interested in generating interesting artistic patterns, so we can omit these conditions and take any real values. We can even go further and take α and β as two-dimensional points from R 2 , but in such a case, we need to define multiplication in order to be able to perform calculations in the S-iteration. Thus, we define the multiplication in a similar way as for complex numbers, i.e.,
x 1 y 1 · x 2 y 2 = x 1 x 2 y 1 y 2 x 1 y 2 + y 1 x 1 .
The last thing that we need to consider—if we want to use S-iteration in the orbit trap method—is the formula for p k + 1 . In the orbit trap method, we generate patterns with wallpaper symmetry, so in each form of the f function, we calculate the final result modulo 2 π . Therefore, in the formula for p k + 1 in (11), we need to do the calculations modulo 2 π .
The modified S-iteration that we will use in the orbit trap method has the following form:
p k + 1 = ( [ 1 , 0 ] T α ) · f ( p k ) + α · f ( u k ) mod [ 2 π , 2 π ] T , u k = ( [ 1 , 0 ] T β ) · p k + β · f ( p k ) ,
where p 0 R 2 is a starting point; α , β R 2 are parameters; and f : R 2 R 2 is the mapping introduced in Section 2. Let us notice that when the parameters α and β are of the following form: α = [ x α , 0 ] T , β = [ x β , 0 ] T , where x α , x β R , then (13) reduces to the S-iteration with scalar parameters α = x α , β = x β . Therefore, for α = [ 1 , 0 ] T and β = [ 0 , 0 ] T , iteration (13) reduces to the standard Picard iteration.
Looking again at Algorithm 2 and the orbit traps presented in Figure 1, we see that the circles forming the orbit traps are defined in a metric space in which we use the Euclidean metric. When introducing the S-iteration to the orbit trap method, we assumed that we take the metric space ( R 2 , d ) , where d is any metric in R 2 . Thus, the circles will have different shapes for various metrics. In the rest of the paper, we will use three metrics defined in R 2  [25]:
  • l p -metric, where p [ 1 , )
    d p ( [ x 1 , y 1 ] T , [ x 2 , y 2 ] T ) = | x 1 x 2 | p + | y 1 y 2 | p 1 p ,
  • Chebyshev metric (or l -metric)
    d ( [ x 1 , y 1 ] T , [ x 2 , y 2 ] T ) = max { | x 1 x 2 | , | y 1 y 2 | } ,
  • Rickman’s rug metric
    d γ ( [ x 1 , y 1 ] T , [ x 2 , y 2 ] T ) = | x 1 x 2 | + | y 1 y 2 | γ ,
    where γ ( 0 , 1 ) .
Examples of circles with centre [ 0 , 0 ] T and radius 1 obtained with metrics (14)–(16) are presented in Figure 2.
Besides the use of the S-iteration and various metrics for orbit traps, we also introduce three new orbit traps:
(a)
c 0 = [ 0 , 3.5 ] T , c 1 = [ 0 , 3.5 ] T , r 0 = r 1 = 3.5 ,
(b)
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 2 ,
(c)
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 = = 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].  
Algorithm 3: Modified orbit trap method.
Applsci 12 02923 i003

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.
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 Figure 1 and Figure 3. The obtained patterns are presented in Figure 5, and the parameters used to generate them were the following: colour map from Figure 4b, area [ 2 π , 2 π ] 2 , M = 100 , Picard iteration (i.e., α = [ 1 , 0 ] T , β = [ 0 , 0 ] T ), Euclidean metric, function f given by (8) with p3m1 symmetry and G v 0 = [ 0.343244 , 0.711418 ] T , G v 1 = [ 0.671499 , 0.289951 ] T , G v 2 = [ 0.959405 , 0.868905 ] T , H v 0 = [ 0.224996 , 0.0844803 ] T , H v 1 = [ 0.0571376 , 0.0250126 ] T , and H v 2 = [ 0.0250892 , 0.553883 ] T . From the images in Figure 5, we see that only Figure 5a,c,g have the same symmetry type as f, namely the p3m1 symmetry. All the other images have another type of symmetry, namely, the cm symmetry. When we look at the orbit traps used to obtain the patterns with p3m1 symmetry, then we notice that they have the same rotational symmetries and reflections as the p3m1 symmetry. Thus, to generate a pattern with a given symmetry type, the function f and the orbit traps should satisfy similar symmetry conditions. Moreover, from this example, we can observe one more interesting thing. When we look at the orbit traps in Figure 1c and Figure 3b, we see that they are the same circles but rotated by 45 . However, if we look at the patterns generated using them with the same other parameters (see Figure 5d,e), then we notice that the patterns are completely different. Thus, a modification of the orbit traps obtained by rotation could lead to a significant shape change of the resulting pattern.
In the next example, we present the effect of changing the metric used in the definition of the orbit traps. To show this, we fix orbit traps and change the metric and its parameter, i.e., p for the l p metric and γ for the Rickman’s rug metric. In the example, we use orbit traps from Figure 3a, and the other parameters defining the pattern were the following: area [ 2 π , 2 π ] 2 , M = 100 , E = 16 , Picard iteration ( α = 1 , β = 0 in the S-iteration), colour map from Figure 4c, and function f given by (1) with the cmm symmetry defined by the coefficients (we give only the non-zero elements of the matrix that defines (1)) P 04 = [ 0 , 0.890893 ] T , P 13 = [ 0 , 0.594811 ] T , P 24 = [ 0 , 0.166299 ] T , P 31 = [ 2.33836 , 0 ] T , P 40 = [ 1.53665 , 0 ] T , and P 42 = [ 0.149503 , 0 ] T . In Figure 6, we show patterns obtained with the l p metric with the following values of p: (a) 1.0 , (b) 1.5 , (c) 2.0 , (d) 2.5 , (e) 3.0 , and (f) , whereas in Figure 7, we see patterns generated using Rickman’s rug metric with the following values of γ : (a) 0.9 , (b) 0.7 , (c) 0.5 , and (d) 0.1 . The image from Figure 6c was obtained with the Euclidean metric that was used in the original method presented in [17]. It will serve as a reference point. When we increase the value of p over 2.0 (Figure 6d–f), we see that some of the areas of the pattern are gradually smooth out. This change is continuous, and the smoothing becomes bigger with the increase of the p value, obtaining in the limit the pattern presented in Figure 6f. When we decrease p below 2.0 and tend to 1.0 (Figure 6a,b), we see that more details appear in the pattern compared to the pattern obtained with the original method. If we look at the images obtained with the Rickman’s rug metric, then we can also notice a smoothing effect with the decrease of the γ value. However, some other details are smoothed out compared to the l p metric. Therefore, we see that with the use of various metrics, we can obtain very interesting patterns that were not possible to obtain with the Euclidean metric.
The next two examples show the use of the S-iteration. In the first example, we use S-iteration with scalar parameters α and β , which corresponds to the case in which we vary the x coordinate and take y = 0 of the parameters. In the second example, we use S-iteration, in which the β parameter is fixed and the α parameter has fixed x coordinate and varying y coordinate.
In the first example with the S-iteration, we generate patterns for scalar values of the iteration’s parameters, i.e., the parameters are of the form α = [ x α , 0 ] T , β = [ x β , 0 ] T , where x α , x β R . The generated patterns are presented in Figure 8, where the following parameters were used in the generation process: orbit traps from Figure 3b with Euclidean metric, area [ 2 π , 2 π ] 2 , M = 100 , E = 16 , colour map from Figure 4a, and function f given by (1) with the p4m symmetry defined by the coefficients (again we give only the non-zero elements of the matrix) P 03 = [ 0 , 0.234602 ] T , P 04 = [ 0 , 0.231376 ] T , P 13 = [ 0 , 0.931333 ] T , P 14 = [ 0 , 0.982975 ] T , P 23 = [ 0 , 0.429163 ] T , P 24 = [ 0 , 0.363704 ] T , P 30 = [ 0.234602 , 0 ] T , P 31 = [ 0.931333 , 0 ] T , P 32 = [ 0.422963 , 0 ] T , P 40 = [ 0.231376 , 0 ] T , P 41 = [ 0.982975 , 0 ] T , and P 42 = [ 0.363704 , 0 ] T . From the images, we see that by changing the scalar values of the α and β parameters in the S-iteration, we are able to generate a great variety of patterns. The shapes of the patterns can be very simple, as in Figure 8a, or very complex, as in Figure 8d.
In the second example, with the S-iteration, we generate patterns in which we vary the y coordinate of the α parameter, and the other parameters are fixed. In this way, we show that not only scalar parameters generate interesting patterns but also the vector parameters. In the example, we used the following parameters: β = [ 0.5 , 0 ] T in the S-iteration, orbit traps from Figure 1c with Euclidean metric, area [ 2 π , 2 π ] 2 , M = 100 , E = 16 , colour map from Figure 4d, and function f given by (1) with the p4 symmetry defined by the coefficients (again we give only the non-zero elements of the matrix) P 03 = [ 0.215989 , 0.150289 ] T , P 04 = [ 0.0748772 , 0.670663 ] T , P 13 = [ 0.741719 , 0.543639 ] T , P 14 = [ 0.709028 , 0.822211 ] T , P 23 = [ 0.708072 , 0.814562 ] T , P 24 = [ 0.100835 , 0.40511 ] T , P 30 = [ 0.150289 , 0.215989 ] T , P 31 = [ 0.543639 , 0.741719 ] T , P 32 = [ 0.814562 , 0.708072 ] T , P 40 = [ 0.670663 , 0.0748772 ] T , P 41 = [ 0.822211 , 0.709028 ] T , and P 42 = [ 0.40511 , 0.100835 ] T . In Figure 9, we see patterns generated with the following values of the α parameter: (a) [ 1.1 , 0.5 ] T , (b) [ 1.1 , 0.8 ] T , (c) [ 1.1 , 0.8 ] T , and (d) [ 1.1 , 4 ] T . Similar to the scalar case, when varying the y coordinate of the α parameter, we are able to obtain a great variety of patterns. The generated patterns vary not only in shape but also in colouring. In Figure 9, we see a greater variety of colours than in Figure 8.
In the end, we present an interesting observation. When using orbit traps in which we have an empty space in the neighbourhood of the origin that is surrounded by the orbit traps (see orbit traps in Figure 1b,c and Figure 3b) and function f with compatible symmetry type, then in the area near the origin of the generated pattern, we find self-similar structures. Thus, the patterns have a local fractal structure. To observe this, in Figure 10, we present magnification of the central part of the patterns from Figure 5c, Figure 8c and Figure 9a. If we magnify these areas further, then we get the same images repeatedly, so we clearly see the local self-similarity property.

5. Conclusions

In this paper, we proposed extensions of the orbit trap method introduced in [17]. The extensions rely on the use of (1) new orbit traps, (2) various metrics instead of the Euclidean one, and (3) the S-iteration. Moreover, we extended the S-iteration from scalar to vector parameters. The presented examples showed that we are able to generate patterns, which we had not been able to obtain previously.
In our extensions, we used only the S-iteration. In the literature, there are many other iteration methods. For example, in [26], we can find a review of 17 different iterations and their dependencies. Moreover, there are iteration methods that use several mappings [14]. Thus, an interesting direction for further study would be the use of other iteration methods.
Not all values of the parameters defining the f function that satisfy the appropriate symmetry condition give rise to interesting and artistic patterns [15]. To find the values that will give artistic patterns, Carter et al. in [15] used a simple Monte Carlo method, so the evaluation of the pattern was made by the authors. Therefore, another direction for future studies would be developing an automatic method for finding patterns with artistic features. For instance, we could try to use genetic algorithms for this task because this type of method has proven itself in various methods that generate artistic images [27,28,29].

Author Contributions

Conceptualization, K.G. and H.A.; methodology, K.G.; software, K.G.; investigation, K.G.; writing—original draft preparation, K.G.; writing—review and editing, K.G. and H.A.; visualization, K.G. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Natural Science Foundation of China grant number 62062042.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data that support the findings of this study are available from the corresponding author, upon reasonable request.

Conflicts of Interest

The authors declare that they have no conflict of interest.

Appendix A. Symmetry Conditions

In this appendix, we gathered the conditions that function f given by (1) must satisfy to generate a pattern with one of the symmetry types: p2, pm, pg, cm, cmm, pmm, pmg, pgg, p4, p4m, and p4g.
The symmetry of the considered function f depends on the matrix:
P = P 00 P 04 P 40 P 44 ,
where P 00 , P 01 , , P 44 R 2 . For simplicity, we present the conditions in the form of a matrix M (a mask) that has the same dimensions as P. To obtain a matrix P that will define f with symmetry type given by the mask M, we need to calculate P = P M , where ∘ is element-wise product of matrices and vectors.
Let us introduce the following notation:
0 = 0 0 , 1 = 1 1 , = 1 0 , = 0 1 .
The masks for the p2, pm, pg, cm, cmm, pmm, pmg, and pgg symmetries are the following [15]:
M p 2 = 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 1 1 0 0 1 1 1 0 0 , M p m = , M p g =
M c m = 0 0 0 0 0 0 0 0 0 0 0 0 , M c m m = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 , M p m m = 0 0 0 0 0 0 0 0 0 0 0 0 0
M p m g = 0 0 0 0 0 0 0 0 0 0 0 0 0 , M p g g = 0 0 0 0 0 0 0 0 0 0 0 0 0
In the case of the p4, p4m, and p4g symmetries, we cannot give the conditions in the form of masks because the coefficients of P must satisfy some symmetry conditions that cannot be placed in the mask. Therefore, for these three symmetry types, we directly give the form of the matrix P [15]:
P p 4 = 0 0 0 m 00 m 01 m 10 m 11 0 0 0 m 20 m 21 m 30 m 31 0 0 0 m 40 m 41 m 50 m 51 m 01 m 00 m 21 m 20 m 41 m 40 0 0 m 11 m 10 m 31 m 30 m 51 m 50 0 0 ,
P p 4 m = 0 0 0 0 m 01 0 m 11 0 0 0 0 m 21 0 m 31 0 0 0 0 m 41 0 m 51 m 01 0 m 21 0 m 41 0 0 0 m 11 0 m 31 0 m 51 0 0 0 ,
P p 4 g = 0 0 0 0 0 m 11 0 0 0 m 20 0 0 0 0 0 0 0 m 51 0 0 m 20 0 0 0 m 11 0 0 m 51 0 0 0 ,
where m 00 , m 01 , m 10 , m 11 , , m 50 , m 51 R .

References

  1. Oxford English Dictonary Online. 2022. Available online: http://www.oed.com (accessed on 20 August 2017).
  2. Liu, Y.; Lin, W. Deformable Texture: The Irregular-Regular-Irregular Cycle; Technical Report; Carnegie Mellon University: Pittsburgh, PA, USA, 2003. [Google Scholar]
  3. Ebert, D.; Musgrave, F.; Peachey, D.; Perlin, K.; Worley, S. Texturing and Modeling: A Procedural Approach, 3rd ed.; Morgan Kaufmann: San Francisco, CA, USA, 2002. [Google Scholar]
  4. Gieseke, L.; Asente, P.; Mech, R.; Benes, B.; Fuchs, M. A Survey of Control Mechanisms for Creative Pattern Generation. Comput. Graph. Forum 2021, 40, 585–609. [Google Scholar] [CrossRef]
  5. Gdawiec, K. Inversion Fractals and Iteration Processes in the Generation of Aesthetic Patterns. Comput. Graph. Forum 2017, 36, 35–45. [Google Scholar] [CrossRef]
  6. Helt, G. Extending Mandelbox Fractals with Shape Inversions. In Proceedings of the Bridges 2018: Mathematics, Art, Music, Architecture, Education, Culture; Torrence, E., Torrence, B., Séquin, C., Fenyvesi, K., Eds.; Tessellations Publishing: Phoenix, AZ, USA, 2018; pp. 547–550. Available online: http://archive.bridgesmathart.org/2018/bridges2018-547.pdf (accessed on 1 February 2022).
  7. Liu, S.; Leng, M.; Ouyang, P. The Visualization of Spherical Patterns with Symmetries of the Wallpaper Group. Complexity 2018, 2018, 7315695. [Google Scholar] [CrossRef] [Green Version]
  8. Ouyang, P.; Fathauer, R.; Chung, K.; Wang, X. Automatic Generation of Hyperbolic Drawings. Appl. Math. Comput. 2019, 347, 653–663. [Google Scholar] [CrossRef]
  9. Mitchell, K. Fun with Whirls. In Proceedings of the Bridges 2015: Mathematics, Music, Art, Architecture, Culture; Delp, K., Kaplan, C., McKenna, D., Sarhangi, R., Eds.; Tessellations Publishing: Phoenix, AZ, USA, 2015; pp. 175–182. Available online: http://archive.bridgesmathart.org/2015/bridges2015-175.html (accessed on 1 February 2022).
  10. Ouyang, P.; Tang, X.; Chung, K.; Yu, T. Spiral Patterns of Color Symmetry from Dynamics. Nonlinear Dyn. 2018, 94, 261–272. [Google Scholar] [CrossRef]
  11. Qiu, C.; Li, X.; Pang, J.; Ouyang, P. Visualization of Escher-like Spiral Patterns in Hyperbolic Space. Symmetry 2022, 14, 134. [Google Scholar] [CrossRef]
  12. Gdawiec, K. Procedural Generation of Aesthetic Patterns from Dynamics and Iteration Processes. Int. J. Appl. Math. Comput. Sci. 2017, 27, 827–837. [Google Scholar] [CrossRef] [Green Version]
  13. Lu, J.; Ye, Z.; Zou, Y. Automatic Generation of Colorful Patterns with Wallpaper Symmetries from Dynamics. Vis. Comput. 2007, 23, 445–449. [Google Scholar] [CrossRef]
  14. Gdawiec, K. Fractal Patterns from the Dynamics of Combined Polynomial Root Finding Methods. Nonlinear Dyn. 2017, 90, 2457–2479. [Google Scholar] [CrossRef]
  15. Carter, N.; Eagles, R.; Grimes, S.; Hahn, A.; Reiter, C. Chaotic Attractors with Discrete Planar Symmetries. Chaos Solitons Fractals 1998, 9, 2031–2054. [Google Scholar] [CrossRef]
  16. Carlson, P. Two Artistic Orbit Trap Rendering Methods for Newton M-set Fractals. Comput. Graph. 1999, 23, 925–931. [Google Scholar] [CrossRef]
  17. Lu, J.; Ye, Z.; Zou, Y.; Ye, R. Orbit Trap Rendering Methods for Generating Artistic Images with Crystallographic Symmetries. Comput. Graph. 2005, 29, 787–794. [Google Scholar] [CrossRef]
  18. Agarwal, R.; O’Regan, D.; Sahu, D. Iterative Construction of Fixed Points of Nearly Asymptotically Nonexpansive Mappings. J. Nonlinear Convex Anal. 2007, 8, 61–79. [Google Scholar]
  19. Pickover, C. Computers and the Imagination; St. Martin’s Press: New York, NY, USA, 1992. [Google Scholar]
  20. Berinde, V. Iterative Approximation of Fixed Points; Springer: Berlin/Heidelberg, Germany, 2007. [Google Scholar]
  21. Kalantari, B. Polynomial Root-Finding and Polynomiography; World Scientific: Singapore, 2009. [Google Scholar] [CrossRef]
  22. Chen, N.; Chen, Y.; Chung, K. Fractals from Nonlinear IFSs of the Complex Mapping Family f(z) = zn + c. Fractals 2018, 26, 1850044. [Google Scholar] [CrossRef]
  23. Barnsley, M. Fractal Everywhere: New Edition; Dover Publications: Mineola, NY, USA, 2012. [Google Scholar]
  24. Khan, S. A Picard-Mann Hybrid Iterative Process. Fixed Point Theory Appl. 2013, 2013, 69. [Google Scholar] [CrossRef]
  25. Deza, M.; Deza, E. Encyclopedia of Distances, 4th ed.; Springer: Berlin/Heidelberg, Germany, 2016. [Google Scholar]
  26. Gdawiec, K.; Kotarski, W. Polynomiography for the Polynomial Infinity Norm via Kalantari’s Formula and Nonstandard Iterations. Appl. Math. Comput. 2017, 307, 17–30. [Google Scholar] [CrossRef] [Green Version]
  27. Lu, S.; Mok, P.; Jin, X. From Design Methodology to Evolutionary Design: An Interactive Creation of Marble-like Textile Patterns. Eng. Appl. Artif. Intell. 2014, 32, 124–135. [Google Scholar] [CrossRef]
  28. Lv, J.; Zhu, M.; Pan, W.; Liu, X. Interactive Genetic Algorithm Oriented toward the Novel Design of Traditional Patterns. Information 2019, 10, 36. [Google Scholar] [CrossRef] [Green Version]
  29. Pang, W.; Hui, K. Interactive Evolutionary 3D Fractal Modeling. Vis. Comput. 2010, 26, 1467–1483. [Google Scholar] [CrossRef]
Figure 1. Orbit traps used in [17]. (a) one orbit trap; (b) three orbit traps; (c) four orbit traps; and (d) seven orbit traps.
Figure 1. Orbit traps used in [17]. (a) one orbit trap; (b) three orbit traps; (c) four orbit traps; and (d) seven orbit traps.
Applsci 12 02923 g001
Figure 2. Circles with centre [ 0 , 0 ] T and radius 1 obtained with various metrics. (a) l p ; (b) Chebyshev; and (c) Rickman.
Figure 2. Circles with centre [ 0 , 0 ] T and radius 1 obtained with various metrics. (a) l p ; (b) Chebyshev; and (c) Rickman.
Applsci 12 02923 g002
Figure 3. New orbit traps obtained with the Euclidean metric. (a) two orbit traps; (b) four orbit traps; and (c) five orbit traps.
Figure 3. New orbit traps obtained with the Euclidean metric. (a) two orbit traps; (b) four orbit traps; and (c) five orbit traps.
Applsci 12 02923 g003
Figure 4. Colour maps used in the examples.
Figure 4. Colour maps used in the examples.
Applsci 12 02923 g004
Figure 5. Patterns generated with function f with p3m1 symmetry and various orbit traps from Figure 1 and Figure 3. (a) 1 orbit trap from Figure 1a; (b) 2 orbit traps from Figure 3a; (c) 3 orbit traps from Figure 1b; (d) 4 orbit traps from Figure 1c; (e) 4 orbit traps from Figure 3b; (f) 5 orbit traps from Figure 3c; and (g) 7 orbit traps from Figure 1d.
Figure 5. Patterns generated with function f with p3m1 symmetry and various orbit traps from Figure 1 and Figure 3. (a) 1 orbit trap from Figure 1a; (b) 2 orbit traps from Figure 3a; (c) 3 orbit traps from Figure 1b; (d) 4 orbit traps from Figure 1c; (e) 4 orbit traps from Figure 3b; (f) 5 orbit traps from Figure 3c; and (g) 7 orbit traps from Figure 1d.
Applsci 12 02923 g005
Figure 6. Patterns generated with function f with cmm symmetry and orbit traps from Figure 3a with various values of p in the l p metric. (a) l 1.0 ; (b) l 1.5 ; (c) l 2.0 ; (d) l 2.5 ; (e) l 3.0 ; and (f) l .
Figure 6. Patterns generated with function f with cmm symmetry and orbit traps from Figure 3a with various values of p in the l p metric. (a) l 1.0 ; (b) l 1.5 ; (c) l 2.0 ; (d) l 2.5 ; (e) l 3.0 ; and (f) l .
Applsci 12 02923 g006
Figure 7. Patterns generated with function f with cmm symmetry and orbit traps from Figure 3a with various values of γ in the Rickman’s rug metric. (a) γ = 0.9 ; (b) γ = 0.7 ; (c) γ = 0.5 ; and (d) γ = 0.1 .
Figure 7. Patterns generated with function f with cmm symmetry and orbit traps from Figure 3a with various values of γ in the Rickman’s rug metric. (a) γ = 0.9 ; (b) γ = 0.7 ; (c) γ = 0.5 ; and (d) γ = 0.1 .
Applsci 12 02923 g007
Figure 8. Patterns generated with function f with p4m symmetry, orbit traps from Figure 3b, and S-iteration with varying scalar α and β parameters. (a) α = [ 1.1 , 0 ] T , β = [ 1.1 , 0 ] T ; (b) α = [ 1.5 , 0 ] T , β = [ 1 , 0 ] T ; (c) α = [ 1.5 , 0 ] T , β = [ 1.3 , 0 ] T ; and (d) α = [ 2 , 0 ] T , β = [ 1.1 , 0 ] T .
Figure 8. Patterns generated with function f with p4m symmetry, orbit traps from Figure 3b, and S-iteration with varying scalar α and β parameters. (a) α = [ 1.1 , 0 ] T , β = [ 1.1 , 0 ] T ; (b) α = [ 1.5 , 0 ] T , β = [ 1 , 0 ] T ; (c) α = [ 1.5 , 0 ] T , β = [ 1.3 , 0 ] T ; and (d) α = [ 2 , 0 ] T , β = [ 1.1 , 0 ] T .
Applsci 12 02923 g008
Figure 9. Patterns generated with function f with p4 symmetry, orbit traps from Figure 1c, and S-iteration with β = [ 0.5 , 0 ] T and varying α parameter. (a) α = [ 1.1 , 0.5 ] T ; (b) α = [ 1.1 , 0.8 ] T ; (c) α = [ 1.1 , 0.8 ] T ; and (d) α = [ 1.1 , 4 ] T .
Figure 9. Patterns generated with function f with p4 symmetry, orbit traps from Figure 1c, and S-iteration with β = [ 0.5 , 0 ] T and varying α parameter. (a) α = [ 1.1 , 0.5 ] T ; (b) α = [ 1.1 , 0.8 ] T ; (c) α = [ 1.1 , 0.8 ] T ; and (d) α = [ 1.1 , 4 ] T .
Applsci 12 02923 g009
Figure 10. Magnifications of the areas near the origin of patterns from Figure 5c, Figure 8c and Figure 9a. These magnifications show the local self-similarity property of the patterns. (a) Figure 5c; (b) Figure 8c; and (c) Figure 9a.
Figure 10. Magnifications of the areas near the origin of patterns from Figure 5c, Figure 8c and Figure 9a. These magnifications show the local self-similarity property of the patterns. (a) Figure 5c; (b) Figure 8c; and (c) Figure 9a.
Applsci 12 02923 g010
Table 1. Base colours and colour ratios used to generate colour maps in Figure 4.
Table 1. Base colours and colour ratios used to generate colour maps in Figure 4.
Base ColourColour Ratio
(a)
( 0 , 0 , 0 ) 0.0
( 255 , 0 , 0 ) 0.7
( 255 , 128 , 0 ) 0.75
( 0 , 0 , 0 ) 0.8
( 255 , 128 , 0 ) 0.85
( 255 , 255 , 255 ) 0.9
( 26 , 0 , 0 ) 1.0
(b)
( 0 , 0 , 0 ) 0.0
( 0 , 0 , 150 ) 0.5
( 161 , 202 , 241 ) 0.7
( 243 , 195 , 0 ) 0.75
( 0 , 0 , 0 ) 0.8
( 243 , 195 , 0 ) 0.85
( 255 , 255 , 255 ) 0.9
( 26 , 0 , 0 ) 1.0
(c)
( 0 , 0 , 0 ) 0.0
( 6 , 204 , 2 ) 0.6
( 0 , 0 , 0 ) 0.8
( 19 , 158 , 245 ) 0.85
( 200 , 200 , 200 ) 0.9
( 115 , 106 , 55 ) 1.0
(d)
( 0 , 0 , 0 ) 0.0
( 254 , 0 , 0 ) 0.25
( 0 , 255 , 0 ) 0.3
( 255 , 255 , 127 ) 0.47
( 25 , 0 , 0 ) 0.6
( 255 , 52 , 0 ) 0.7
( 0 , 128 , 255 ) 0.85
( 25 , 0 , 0 ) 1.0
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Gdawiec, K.; Adewinbi, H. Procedural Generation of Artistic Patterns Using a Modified Orbit Trap Method. Appl. Sci. 2022, 12, 2923. https://doi.org/10.3390/app12062923

AMA Style

Gdawiec K, Adewinbi H. Procedural Generation of Artistic Patterns Using a Modified Orbit Trap Method. Applied Sciences. 2022; 12(6):2923. https://doi.org/10.3390/app12062923

Chicago/Turabian Style

Gdawiec, Krzysztof, and Hezekiah Adewinbi. 2022. "Procedural Generation of Artistic Patterns Using a Modified Orbit Trap Method" Applied Sciences 12, no. 6: 2923. https://doi.org/10.3390/app12062923

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop