Performance Evolution of a Fractal Dimension Estimated by an Escape Time Algorithm

: A fractal dimension is a non-integer number that used as an index of the complexity and characteristics of an image. Using fractal dimensions, we can distinguish the properties of images and compare their characteristics, which is of great importance in many applications. Nowadays, there are two algorithms that are initialized to construction a fractal attractor set. The ﬁrst is the iterated function system (IFS), and the second is the escape time algorithm (ETA). In this paper, we present a modiﬁed method for calculating two kinds of fractal dimensions, i.e., the box dimension and the correlation dimension of a fractal attractor set, created by ETA, such as for a ﬁlled Julia set, and those created by iterated IFS, such as for a Sierpinski gasket. Since IFS can only use a certain iteration to create fractal attractors, this limitation has made the ETA the most general and eﬃcient algorithm for creating fractal attractors when the iteration functions are complex. It is one of the earliest colouring algorithms, and, in many applications, it is considered to be the only available option. Therefore, this motivates us to introduced a new algorithm to convert the fractal attractor created by the IFS into a fractal attractor set created by the ETA. This conversion will be accomplished by ﬁnding the shift dynamical system of the totally disconnected or non-overlapping IFS. In addition, we modify the correlation and box dimensions to calculate the dimensions of fractal attractor sets created by the ETA. Moreover, we compare the proposed algorithms for fractal dimensions with the previously known algorithms from the literature in terms of the points and computational time needed.


Introduction
Many definitions for the fractal dimension of a fractal attractor set (FA-set) have been proposed, such as the capacity, box, Minkowski, and correlation dimensions. Popular methods for calculating a fractal dimension were introduced by Barnsley [1], who proposed the fractal interpolation process which uses the iterated function system (IFS) to output a fractal set of K+1 points. This method creates an image that is the FA-set of the IFS of K contraction mappings [1,2,3]. Grasssberger-Procaccia [4] proposed an algorithm to calculate the correlation dimension of the FA-set-measured µ from a given set of points according to the randomly distributed µ, Al-Saidie and Mohammed in [5,6] introduced another kind of fractal dimension to the FA-set created by the escape time algorithm (ETA).
Further, Al-Shameri, and Mohammed [7] introduced an approximation of the correlation dimensions for the FA-sets created by IFS. In addition, Mohammed and Mohammed [8] proposed a correlation dimension based on ETA, for which it is assumed that all points beyond black and white ,and, although it is accurate, an error takes place when it is applied. In this paper, we proposed new box and correlation dimensions of FA-sets created by ETA by assuming that the point are coloured by the colour indexed by the number of iterations. Doing so will help to minimize the errors in the final approximation of the dimensions of FA-sets created by ETA and provides efficient results in a feasible amount of time.
The remainder of this paper is organized as follows: Section 2 presents the theoretical background of fractals. The FA-set created by IFS and ETA, along with a new algorithm used to convert the fractal attractor created by IFS into a fractal attractor created by ETA, is presented in Section 3. Section 4 proposes the escape-box and escape-correlation dimensions based on ETA. Section 5 presents the algorithm's implementation and its comparison with the classical and other proposed algorithms for known fractal sets created by the ETA (e.g., a filled Julia set) and IFS (e.g., a Sierpinski gasket). Finally, conclusions are provided in section 6.

Theoretical Considerations
This section will provide the definitions and sketch the results needed in the rest of this paper [1,4].
Let (X, d) be a complete metric space and H(X) denote the fractal space defined by: H(X) ={A ⊆ X : A = ∅ and compact} . Then H(X, h) is a complete metric space with the metric function defined by h ( An IFS {X,Ψ 1 ,Ψ 2 , . . . ,Ψ n } is a set of contruction mappings {Ψ 1 ,Ψ 2 , . . . ,Ψ n } acting on (X, d), where Ψ n : X → X is a contraction mapping with contractivity factor s n for n = 1, 2, . . . , N .
The mapping Ψ: where Ψ k indicates the k-fold composition of Ψ. The fixed point A described above is called the FA-set of the IFS.
The dynamic system {H(X); Ψ} on fractals possesses a unique fixed point A ∈ H(X), and the IFS attractor {X; ; Ψ 1 , Ψ 2 , ..., Ψ n } is an attractive fixed point in the dynamic system {H(X); ; W}. To establish the relation between IFS and the dynamic system, we need the following definition: Let {X; Ψ n , n = 1, 2, . . . , N } be a totally disconnected or non-overlapping IFS with FA-set A. The mapping f : A → A defined by f (a) =Ψ −1 1 (a) for a ∈ Ψ n (A) is called the associated shift transformation on A. The dynamic system {A; f } is called the shift dynamical system associated with the IFS.
There are many definitions that have been proposed for the fractal dimensions of FA-sets. In this paper, we investigate and implement the procedure for minimizing the error and time involved in the approximation of the fractal dimension of the FA-set created by ETA based on the correlation and box dimensions. In addition, we discuss the correlation dimension (corr-dim δ cor ), and box dimension (B-dim δ B ) [1].
Let A be a totally bounded subset of X, where (X, d) is a metric space. Then the capacity dimension is defined by assuming C(A) =N ε (A)ε δ(ε) as a capacity of A, δ(ε) as a mapping of ε, and N ε (A) as the minimum number of closed balls with radius ε that cover A.
if lim ε→0 δ(ε) = ln ( Nε(A)) ln ( 1/ε) − ln ( C(A)) ln ( 1/ε) exists, then δ is called the capacity dimension of A. If the capacity dimension δ not an integer, then δ is called a fractal dimension. Also, when X =R m and A is a totally bounded subset of R m , 0 < r < 1, then a positive integer n exists such that r n < ε ≤ r n+1 for each real number ε > 0, and δ B = lim ε→0 δ (ε) = lim n→∞ δ (r n ) . Moreover, Then δ B is called the box dimension. The correlation dimension (corr − dim) is a measurement of the dimensionality of the space taken by a set of random points. It is one of the simple and widely used numerical measurements of dimensionality.

Construction of FA-set Based on the Shift Dynamical System for the IFS
There are many ways to create an FA-set. In this paper, we will address two types of these sets. First, we will examine the FA-sets created by IFS, such as the Sierpinski gasket, cantor, and van Koch curve sets. Second, we will discuss the FA-sets created by the ETA, such as the Julia, filled Julia, and Mandelbrot sets. The IFS is computationally complex, but the ETA has easier calculations and provides more accurate images than the IFS methods. In addition, the ETA is a more global and efficient algorithm in terms of constructing a fractal in comparison to the iteration functions, motivating us to propose a new algorithm to convert an FA-set created by IFS into an FA-set created by ETA based on the shift dynamical system of the IFS.

The FA-set created by IFS
Then the attractor of the IFS is the set defined by It is clear that the above definition of the attractor depends on the k-fold mapping, which is difficult to calculate. Next, we will implement the orbits of points in W. Let (W; Ψ 1 , Ψ 2 , . . . ,Ψ n ) be an IFS; the attracter be the orbit of x • , where x k =Ψ i x k−1 ; and i be randomly chosen from the set {1, 2, . . . , n}, which represents the number of contraction mappings. Then the orbit provides the image of the FA-set A created by the IFS [1,2].

The FA-set created by the ETA
Let (W, Ψ) be a dynamical system and W = [a, c] × [b, d] be a window, then an FA-set is created by mapping recursively to a particular initial point in the window [9,10].
The algorithm depends on the escape threshold and maximum iteration number to create the FA-set. Then it colours all points in W with various colours. These colours differ for various iteration times according to the colour index. So, if the iteration number of a point is greater than maximum iteration number, then the point is convergent; otherwise, it is divergent [11,12,13,14].
In order to not waste time and identify the convergent points accurately, the escape points from the window are coloured in different colours according to the time of escape. The non-escape points from W are coloured black to minimizing the error in the final approximation of the FA-set created by ETA. However, there is no loss of time.
where Z is any positive integer & x i,j defines an array of points in W G={(x, y) ∈ R 2 : x 2 +y 2 >r 2 } % C is a circle centered at the origin, r is large number.
Output: The E-FA-set, which is called the escape-FA-set. begin % assigned a colour indexed by the first integer n such that ∈ G % f or all n ≤ K} K = the number of iterations end Since fractals are widely used in many applications nowadays, the escape time algorithm is the most effective algorithm for drawing fractal figures. Algorithm 1 can be implemented on any dynamic system {R 2 , f}. Therefore, in order to apply Algorithm 1 to the IFS {R 2 ; Ψ 1 , Ψ 2 , . . . , Ψ N }, we must find the shift dynamical system for the IFS.
Below, we proposed the main algorithm for applying the ETA to the FA-set created by a totally disconnected or non-over lapping IFS by finding the shift dynamical system for the IFS (see Algorithm 2). First, to create a window for a dynamic system in R 2 , we need only to specify a viewing window W= [a, c] × [b, d] of two mappings and the initial point. By iterating this point, we obtain a set of points that define the shape of the window (see Algorithm 3). Due to the ease of tracking points when the window is square, we have proposed an algorithm to convert the rectangular window into a square window (see Algorithm 4).
Algorithm 2: ETA for the construction of the FA-set created by a totally disconnected or non-over lapping IFS Input: n (number of contraction mappings).
a, b.c, d, e, f % IFS code for fractal attractoreach 2D linear map has 6 coefficients of a 2x2 matrix and 2x1 offset vector.
Output: Image black/ multi-colour screen construction by ETA begin finding window (call Algorithm 3) rectangular to square window (call Algorithm 4) for j = 1 to n do read a(j), b(j), c(j), d(j), e(j), f (j)

Generalized Estimation of Fractal Dimension via ETA
The fractal dimension includes information about the geometrical properties of a set. It is used to improve the performance of image-processing algorithms and serves as significant feature of images. The word 'complexity' is part of our everyday lives, and the fractal dimension is a gauge of complexity.
Mohammed in [5] proposed the escape-time dimension of the E-FA-set whereby a window is created inside the origin window W and all the points inside the new window are scanned sequentially by the ETA. When we change segmentation, the previous segmentation is ignored.
In this section, we propose a new estimation technique for estimating the fractal dimension, which is the escape-box dimension (E − B − dim) of the E-FA locally bounded subset of R m found by using a separate scanning to all points within the window W with double binary tree method in R m . This method is better than the previous method in [5] in terms of speed and efficiency without neglecting the previous steps.
Since not all images in nature are self-similar and to deal with fractal image which are not self-similar, we need to generalized some definitions of the dimension. So, the E-B-dim is more general than the other fractal dimension since it deals with the FA-set that is not self-similar. Therefore, we introduce a new technique to calculate the box dimensions of E-FA-sets created by Algorithm 1 when(W, Ψ) is a dynamical system and by Algorithm 2 when {R 2 ; Ψ 1 , Ψ 2 , . . . , Ψ N } is a totally disconnected or non-overlapping IFS. ) and (c, d) denote the coordinates of the lower left and upper right of W , respectively.

Algorithm 5: Escape-box dimension of the E-FA locally bounded subset
begin for n = 1 to N do γ n = 1/2 n end The coordinates of the points in the window W are of the form ±1± 1 2 ± 1 2 2 ± 1 2 3 ± 1 2 4 ± · · · ± 1 (2) n ± . . . such that γ n = 1 2 n , n= 0, 1, . . . , K. for all points (x, y) in W do Z= 2n In the following involved in the final approximation of the fractal attractor set created by ETA using the correlation dimension. Therefore, we propose the following algorithm to calculated the correlation dimension of the E-FA-set which is created by Algorithm 1 when(W, Ψ) is a dynamical system and by Algorithm 2 when {R 2 ; Ψ 1 , Ψ 2 , . . . , Ψ N } is a totally disconnected or non-overlapping IFS. This dimension is called the escape-correlation dimension (E-corr-dim) and symbolized by δ E−cor . Output: PRINT (δ E−cor ) % δ E−cor Escape-correlation dimension begin Escape Time Algorithm (N ) px = x 0 ; py = y 0 ; for j=1 to Ntrans do -Iterating the 2D linear maps via the ETA algorithm.
-General iteration formula for the IFS of 2D linear maps, these map are iterated by E.T.A. end for j=1 to N pts-1 do -Generating escape-fractal attractor set via Algorithm 2. end -Generating Euclidean distance matrix between two points. -Construct a correlation function C(ǫ)that is the probability that two arbitrary points on the fractal attractor are closer together than ǫ. -Fit a line to compute the escape-correlation dimension δ E−corr . end

Implementation and Analysis
To show the results of the proposed algorithms for calculating fractal dimensions, we use two examples, the Sierpinski gasket [1] created by Algorithm 2,and the filled Julia set for the complex function f c (z) =z 2 +c, defined as: where c is any complex number} [15,16] , created by Algorithm 1.
In the first example, the fractal attractor set, the Sierpinski gasket S, is created by the totally disconnected or non-overlapping IFS {R 2 , ω 1 , ω 2 , ω 3 }, where: Algorithm 2 is then used to find a shift dynamical system {S, f } for the IFS, where f is defined as: So, we create the Sierpinski gasket S vis the ETA. By applying Algorithm 6, we obtain the E-corr dimension for S.
We compare the escape -correlation dimension to the Sierpinski gasket S created by Algorithm 2 with the correlation dimension of the Sierpinski gasket created by IFS [4,7], as shown in Table 1    We find that the exact dimension δ corr (S) = 1.5864. Further, the image is generated using 1000 points in 158.147 sec when S is created by IFS. Whereas, when applying Algorithms 2 and 6, we calculate δ E−corr (S) = 1.5864 and get the exact image and its dimension using 300 points in 5.238 sec, proving the efficiency of our proposed Algorithms 2 and 6 in obtaining a good estimate of the fractal dimension without any loss of time. Table 1 shows the value of the δ corr (S) and δ E−corr (S) according to the time used. In the second example, by applying Algorithm 1 for f c (z) =z 2 +c, where c = −0.1 + 0.6557, we obtain the filled Julia set F J c create by ETA, as shown in Figure 3. 159 sec, whereas when we apply Algorithm 6, we find that δ E−cor (Jf c ) = 1.7729, also with 800 points but in 1.011 sec. There is not much difference between the dimensions found by Algorithm 5 and Algorithm 6, but the time used by Algorithm 6 is less than that used by Algorithm 5. The accurate dimensions without loss in time are shown in Table 2 with the values of δ E−B (Jf c ) and δ E−cor (Jf c ) varying according to the time used.

Conclusions
Nowadays, fractals are everywhere. Their computation times become an important area of study, especially in the case of complex iteration functions. The escape time algorithm is the most used algorithm for generating fractal attractors. Due to the importance of 'complexity,' which is considered a part of our daily lives, and the fractal dimension being used as a complexity gauge, we modify two algorithms for a fractal attractor set based on ETA. One algorithm is for the estimation of the escape-correlation dimension and the other is for calculating escape-box di-mension. Satisfactory results are obtained after applying these algorithms to the E-FA-set. We have found that the iteration number is reduced compared to the classic method. However, the generating time is reduced as well. The new algorithm 6 is more accurate and provides efficient results in a feasible amount of time and Algorithm 5 proves its efficiency in case of not-self images.