Structural Analysis of Deterministic Mass Fractals Using Small-Angle Scattering and Lacunarity Techniques Structural Analysis of Deterministic Mass Fractals Using Small-Angle Scattering and Lacunarity Techniques

The structural characterization of deterministic mass fractals at nano- and microscales is presented in this chapter using two complementary techniques in both reciprocal and real spaces. In the former case, fractal and geometrical features are obtained from the small- angle scattering (SAS) (neutrons, X-rays, light) spectrum in the reciprocal space. The lacunarity technique is considered to extract structural properties and differentiate textures of fractals in real space. We present and discuss various types of mass fractals, such as thin and fat fractals, as well as fractals generated with the Chaos game representation (CGR). We show how the main structural properties of the fractals, such as the fractal dimension, the iteration number, the scaling factor, the overall size of the fractal, and the size of the basic units of the fractal, can be extracted by using SAS and lacunarity techniques.


Introduction
Historically, the mathematical characterization of geometrical properties of objects has its roots in describing regular forms, such as circles, rectangles, spheres, or cuboids. However, most of the natural formations across the scales present fairly complex structures. The fractal geometry, in its turn, describes complex systems that completely or partially preserve their structure under a scale transformation. This property is often called self-similarity and is exhibited in many systems from macro to micro scales [1]. The development of fractal theory to describe natural systems was due to B. Mandelbrot, who was the first to introduce the term fractal from Latin "fractus" meaning "broken" [2]. However, naturally occurring fractals does not preserve self-similarity on all scales. For example, nano-and microfractals, at the bottom, are limited by the size of atoms and molecules and, at the top, by the size of the cluster/aggregate, etc.
Thus, fractals can be divided into two main classes: showing self-similarity at all scales (also known simply as fractals), and respectively showing self-similarity only on a finite range of scales. The latter ones are also known as pre-fractals but we refer to them as fractals to keep track with the common terminology in literature.
It is considered that one of the main properties that characterize the fractals is the fractal dimension [2,3]. The fractal dimension D of any object can be defined by the minimal number N(r) of the spheres of the radius r that are needed to cover the object, with the condition, that the spheres can penetrate each other and all points within the object are covered at least by one of the spheres. If the object is a fractal, then N(r) has to satisfy the relation where N 0 is the constant. Applying that definition to the straight line or smooth surface shows that D = 1 for the line and D = 2 for the surface, because the number of spheres needed to cover a line is proportional to r À1 and to cover the surface, the number is proportional to r À2 . However, in the case of the fractals, D can take a noninteger value.
Several algorithms have been developed to generate various types of fractals, and roughly they can be divided into two types. Depending on the exact or statistical process involved in the construction algorithms, the obtained fractals may be deterministic (exact self-similar) or stochastic/random (statistically self-similar). Stochastically generated fractals have been proved as effective models for describing disordered systems, such as biological molecules, percolation clusters, diffusion-limited aggregates, etc. [4]. However, rapid progress in the field of materials science [5] allows creating exact deterministic fractal structures [6][7][8][9]. Since the influence of the fractal structure on the physical properties of the system is of significant research interest [11], investigations concerning structural properties of deterministic fractals have been recently suggested [14,30,31].
One of the most effective and representative methods for analyzing the structure of both mass [13] and surface [23] fractals, that provides information about the geometric and fractal properties of the sample in the reciprocal space is the small-angle scattering (SAS) (neutron, X-ray, light) [10,11]. The main feature of the scattering from the mass fractals is the power-law behavior of exponent of the scattering intensity I(q) and which gives the fractal dimension of the sample [12,13] where q is the momentum transfer and D m is the mass fractal dimension of the sample. For surface fractals, the scattering exponent is 6 À D s , where D s is the surface fractal dimension with 2 < D s < 3. Thus, in practice, if the absolute value of the measured scattering exponent is smaller than 3, the sample is a mass fractal with fractal dimension D m , and if the exponent is between 3 and 4, the sample is a surface fractal with fractal dimension 6 À D s .
Although most of the modern fractal research techniques are aimed to analyze fractals according to their fractal dimensions [15,16], such analysis does not directly provide complete information about the spatial arrangement of the mass inside the fractal. The ambiguity may arise from the fact that the particular value of the fractal dimension does not correspond to the unique fractal structure [2]. To deal with this issue, B. Mandelbrot introduced the notion of lacunarity (from Latin "lacuna" meaning "gap") that shows the inhomogeneity of the fractal structure by describing the spatial distribution of mass inside the fractal. This complementary method can be used to analyze real images obtained from SEM, MRI, CT, and other techniques [17,18].
In this chapter, we present and discuss small-angle scattering and the lacunarity techniques for structural analysis of deterministic mass fractals. Discussion of structural properties of surface fractals [31] involves a separate analysis, which is beyond the scope of this chapter. These techniques are implemented to the deterministic mass fractals generated using iterated function systems (IFS) [19]. We also present the structural characterization of various types of mass fractals, such as fat fractals [20] and Chaos game representation (CGR) fractals [21]. We show how to extract from both methods the structural properties, such as the fractal dimension, the iteration number, the scaling factor, the sizes of units of the particular iteration, the sizes of the basic units, and the number of units composing the fractal.

Theoretical background
Structural characterization of the nano-and microscale systems is a rapidly developing field that has influenced many fundamental and applied research areas. The structure of nano-and microscale fractals are mainly obtained by using real space images or by scattering techniques operating in reciprocal space. In the following sections, we discuss the theoretical basics of both approaches.

Small-angle scattering
In a small-angle scattering experiment, beams of neutrons, X-rays, or light are generally used. A typical SAS experimental set-up is presented in Figure 1 and consists of a source of monochromatic beam of particles with incident wave vector k i that irradiates the sample. The particles with the wave vector k f are scattered at the angle 2θ and are registered by the detector. The quantity measured is the differential cross-section per unit volume (for 3D samples) as a function of the momentum transfer or scattering vector q = k i À k f [11].
Let us suppose that the sample consists of identical units with the scattering length b j . If r j is the position vector of the fractal units, then the corresponding scattering length density (SLD) is  ρ s (r) = ∑ j b j δ(r À r j ), where δ is Dirac's delta function. If the particles have uniform SLD ρ f and are placed in a matrix of SLD ρ 0 , then the contrast will be given as Δρ = ρ À ρ 0 . The total scattering intensity in the case of two-dimensional fractal will be given by [11,22] where n is the concentration of fractal, A and A 0 are the surface area of each fractal, and respectively of the irradiated area, is the averaging that takes into account the rotation of the fractals in a three-dimensional space, with equal probability.
Since for the construction of our models, we will use the IFS algorithm, defined in the next section, we shall compute the intensity spectrum starting from Debye formula [24] where I s (q) and F s (q) are the scattered intensity and the form factor of each fractal unit, and r ij is the distance between units i and j. However, the time consumption of the term sin(qr ij )/(qr ij ) is increasing proportional to number of units, and even for modern computers the calculation of the scattering from few thousands of particles may take several hours. The problem can be resolved by introducing a pair-distance histogram g(r) with a bin-width commensurate with the experimental resolution [25] and thus Eq. (4) can be rewritten as where g(r i ) is the pair-distance histogram. We can consider I s q ð Þ ¼ F 2 s q ð Þ ¼ 1 and then using normalization I 0 (q) = I(q)/N, we obtain the following expression for the scattering intensity where S(q) is called the structure factor, and it carries information about the structural properties of the samples. By using the last expression, we can easily implement it as a computational algorithm and to perform calculations few orders of magnitude faster.

Lacunarity
Lacunarity, as opposed to SAS, analyzes the objects in the real space. Nowadays, the technique is widely used in image analysis [26,27]. The concept was introduced by Mandelbrot [2] in the context of characterizing the texture of the fractals. In this chapter, we present results obtained using probabilistic algorithm for estimating lacunarity based on differential box counting (DBC) due to its speed and simplicity in computational implementation. The algorithm was introduced by Voss in [28] and defines lacunarity as the entropy of the discreet pixels on the digital image of the fractal.
The algorithm begins by the consecutive covering of an image with the grid of nonoverlapping square boxes of the size r, as shown in Figure 2. The total number of boxes in the grid that cover the image is denoted as N. Then, the number of occupied boxes with M number of pixels (mass) inside, is determined as n(M, r). The probability function that a box of size r contains M number of pixels is then defined by Statistical moments of P(M, r) are defined as so Z (1) (r) and Z (2) (r) represent the mean of the occupied pixels and respectively, the variance. Thus, the lacunarity can be interpreted as the fluctuations of mass distribution over its mean As it seen from the equation, Λ is increasing when the mean Z(1) tends to 0, meaning that more clustered and inhomogeneous sets will have higher lacunarity. The lacunarity of the deterministic fractals shows periodicity in the spectrum [1]. As it will be shown in the next section, some structural properties of deterministic mass fractals can be extracted from such behavior.
Although, there are few definitions of lacunarity and several algorithms for its computation exist, we will use here an intuitive and elegant probabilistic approach, which is easily performed computationally ( [28]). In spite of this simplicity, it has slight disadvantages in comparison with the gliding-box (GB) algorithm, which provides more precise and hence more time-consuming evaluations [29]. The GB algorithm calculates the lacunarity by placing  the square box of the size r in the corner of the image of the size L, and then glides the box pixel by pixel along horizontal and vertical directions, note that the box should not slide beyond the image. The number of boxes generated by GB algorithm in this case is n GB (r) = (L À r + 1) 2 . The DBC algorithm covers the image by a grid of boxes, and the number of such boxes is n DBC (r) = (L/r) 2 . When L and r are of the same order of magnitude, the difference in number of boxes for both algorithms is negligible, but when L is at least one order larger than r, the number of boxes will differ in two orders. Both algorithms calculate the number of pixels within the box, thus the computational time directly depends on the number of boxes.

Structural properties of mass fractals
In this section, we present the mathematical description of a very well-known fractal generating algorithm and discuss various types of fractals constructed using deterministic and random approaches.

Iterated function systems
There is no universal method to construct a fractal, but one of the most common algorithms to generate a large class of fractals is iterated function systems (IFS) [19]. The IFS image is defined as being the union of geometric transforms of itself. Rigorously, an IFS is a complete metric space (X, d) with a finite set of contraction mappings w n : X ! X, and respective contractive factors s n , n = 1, 2, ⋯, N.
By considering an IFS with contractive factor s, and (H X ð Þ, h(d)) as the space of nonempty compact subsets with the Hausdorff metric h(d), the transformation W :H X ð Þ!H X ð Þ are defined as The unique fixed point ð Þ, and the set A is called the attractor of the IFS [19]. The deterministic algorithm, which allows to find the attractor of an IFS, begins by choosing a compact set A 0 ⊂ R 2 , and then recursively A m according to This process generates the sequence {A m : m = 0, 1, ⋯} ⊂ H X ð Þ that converges to the attractor of the IFS.
The random iteration algorithm begins by assigning the probability p n > 0 to w n for n ¼ 1, 2, ⋯, N, where P N n¼1 p n ¼ 1:Then choosing a point x 0 ∈ X and then recursively, where the probability of the event x k = w n (x k À 1 ) is p n , and k = 1, 2, ⋯. This process generates the sequence {x k : k = 0, 1, ⋯} ⊂ X that converges to the attractor of the IFS.
For a two-dimensional fractal, an IFS can be represented in the matrix form as where a i , b i , c i , d i , and e i , f i with i = 1, 2, …, n are the transformation and translation coefficients of the contraction mapping.

Deterministically generated fractals
Let us consider a model that at the iteration number m = 0 starts with the disk inscribed in the square of the side length a 0 , situated at the origin (initiator). Then, in order to obtain the fractal structure, we establish the rule of evolution (generator) [30,31], shown in Figure 3. The rule is the following: scale the initial disk by the factor of β s = 1/3 and make four copies of it, so the length size of the squares in which the disks at m = 1 are inscribed as a 1 = a 0 β s . Then, translate the obtained circles so that they are situated in the vertices of a square. To generate the structure of the fractal repeat the same rule for each new circle.
The size of the units at m À th iteration is a m ¼ β m s a 0 and the number of the units is N m ¼ 4 m . The fractal that we obtain is a Cantor fractal.The corresponding IFS coefficients of the contraction mappings that generate this fractal are presented in Table 1.
The fractal dimension of Cantor-like fractal is determined by [2] D ¼ lim where N m and a m are the number of units and their side length at m-th iteration. As it can be seen, the value of the fractal dimension depends on how many copies are created at each iteration, (in the terms of IFS, the number of the contraction mappings) and on the scaling factor. However, the fractal dimension is completely independent on the translations of the copies, and its value can be the same for different textures, as for the models shown in Figure 4 for which the translation coefficients of one of the contraction mappings have different values, presented in Table 2. Note that the transformation coefficients of the fractals presented in Figure 5 are not modified.
In order to differentiate textures of the above mass-fractal models, we consider them as the square digital images with the side length L = 300 pixels. We calculate the lacunarity spectra according to Eq. (9). The results are shown in the left part of Figure 6. At first, one can find that  the fractal-d has the highest value of the lacunarity along all ranges, which is due to the most inhomogeneous and clustered distribution of the mass among all four models. On the contrary, the texture of the fractal-a has uniformly distributed mass and thus, the lowest lacunarity.
In addition to differentiating the texture, the lacunarity analysis also may reveal some geometrical and fractal properties. For example, when one covers the fractal by the boxes of the exact size as the size of its elements at the particular iteration m, the number of empty boxes takes maximum value. This leads to the highest variation in the mass distribution over the mean and the lacunarity at this scale will increase. The number of such maxima (denoted by vertical lines in Figure 6, left part) shows the iteration number of the fractal. The positions of these maxima reveal the size of the units at particular iteration, and from the periodicity of such maxima, one can obtain the scaling factor.  Fractal-d À1/3 0 Table 2. Translation coefficients of one of the contraction mappings of the Cantor-like fractals construction The SAS data, on the other hand, gives information about structure in the reciprocal space. The typical SAS spectrum consists of the region with a constant intensity at small values of q which is called Guinier region. The rightmost part of the region shows the overall size of the fractal as q = 2π/a, where a is the side length of the fractal. A main feature of the SAS from fractals is that  the slope in the region that immediately follows the Guinier regime, so-called fractal region, gives the fractal dimension of the fractal, as discussed in the Introduction section. The number of the most pronounced minima in this region (denoted by vertical lines in Figure 6, right part) indicates the iteration number and the last minimum indicates the size of basic units as q ¼ 2π=β m s a. The scaling factor of the fractal can be obtained from the periodicity of the minima [14]. Additionally, the asymptotic behavior of SAS spectrum at high values of q provides the information about number of basic units N m at particular iteration [14].
A more general way to construct fractals may be thought in a framework of fat fractals, when the scaling factor is not constant but it depends on the iteration number [20,32]. Here, we present a simple model of the fat fractal, represented by a two-dimensional deterministic Cantor-like mass fractal, as shown in Figure 7. In the presented model, the first two iterations m = 0 and m = 1 of construction of the Cantor-like fat fractal coincide with the structure of ordinary (thin) Cantor-like fractal, which obeys the rule from the However, such problem may be addressed using the gliding-box approach [29].
In the SAS spectrum, the difference between fat and thin fractals may be determined in the fractal region, from the different position of the minima, which correspond to the most common distance between units of the fractal. In the case of the fat fractal the most common distance is shorter than in the case of thin one, thus in the reciprocal space we observe a minimum corresponding to fat fractal, which is shifted to higher value of q. The behavior of scattering curves of both fat and thin fractals is similar at Guinier and asymptotic regions due to the same overall size and equals the number of units.

Stochastically generated fractals
One of the most known stochastic algorithms for the construction of the fractals is the Chaos game representation (CGR) [19], which is based on the random IFS. The CGR approach allows one to visually reconstruct a great number of the different types of fractals, from well-known deterministic fractals to various classes of disordered systems. Technically, CGR is an iterative map that generates the position of units, which cover the attractor of IFS, the image of the fractal. CGR algorithm is very convenient for structural investigations using SAS, because it generates directly the coordinates of the scatters, which can be used in the optimized Debye formula [25].
Here we are interested, how the set of the points generated using the CGR approach will recover the structure of the deterministic fractal. In order to quantitatively analyze the similarities and the differences in the structure of the fractals obtained by both algorithms, we calculate corresponding SAS and lacunarity spectra. In Figure 9 are presented the deterministic and the CGR Cantor fractals. The well-known Cantor fractal is constructed by dividing the square of the side length a 0 into nine smaller squares with side a 1 = β s a 0 , and removing consecutive five noncorner squares. The CGR Cantor fractal is generated using random IFS, with equal probability of choosing one of the contraction mappings presented in Table 1.
It is seen from Figure 9 that the CGR Cantor fractal approaches the structure of the deterministic Cantor fractal with increasing the number of generated points (scattering units) k. To determine the number of generated points in the CGR algorithm needed to obtain the approximation of the deterministic Cantor fractal, we compare the particular iteration, the structure factor, and the lacunarity of the deterministic fractal, and the structure generated from CGR, respectively. Numerically, we calculate the small-angle scattering and the lacunarity spectra for the CGR algorithm at k = 1000 and the deterministic Cantor fractal at m = 3. The results are shown in Figure 10. The left part of the figure shows almost perfect agreement of the spectra of lacunarity. The number of the maxima in the spectrum of the CGR Cantor fractal shows that k = 1000 is enough to reconstruct the deterministic fractal at m = 3. The positions of the maxima show the sizes of the points in CGR and the sizes of the units at m-th iteration for deterministic fractal. Note that the size of the points of CGR algorithm is kept constant for any k. In general, the lacunarity has dependence on the sizes of the points, the larger points leading to smaller gaps and to lower lacunarity.
The SAS spectrum shows the approximation of the structure factors of CGR to deterministic algorithms. The Guinier regions coincide, showing that the overall sizes of the CGR and deterministic fractal are the same. The scattering curves almost completely overlap each other in the intermediate region, except the last minimum. The values of the slopes of the curves, which reveal the fractal dimension is approximately the same. The positions of the minima also coincide for both algorithms. Moreover, the SAS data shows that generating a number of k = 1000 points can reconstruct more than three iterations of the deterministic structure [21]. Different behavior of the curves in the asymptotic region indicates that the number of elements is not the same, 1/N m for the deterministic and 1/k for the CGR algorithms.
In the last part of this section, we present a structural analysis of two well-known fractals generated using CGR. As a first example, we consider the pentaflake fractal, which is a single scale fractal, as shown in Figure 11. The pentaflake is generated using CGR, with the IFS parameters presented in Table 3 for k = 4000 with the scaling factor β s = 0.38. Thus, the fractal dimension is D ≈ À log 5= log 0:38 ≃ 1:67:  The corresponding structure factor of the pentaflake fractal is calculated using Eq. (6) and the lacunarity spectrum using Eq. (9). The results are shown in Figure 12. As in the case of the CGR Cantor fractal, all the main features of SAS from CGR pentaflake are presented in the spectrum and the numerical value of the fractal dimension coincides with the theoretical one given by Eq. (15). The periodicity of the positions of minima in the fractal region shows the value of the scaling factor β s = 0.38, and this is a specific feature of scattering from fractals with a single scale [14,32]. As expected, the lacunarity spectrum of the image of the pentaflake fractal gives the information about the scaling factor from the periodicity of the most pronounced maxima, the iteration number, and corresponding sizes of the units.
The CGR approach is often used to represent the structural properties of the DNA sequence, which exhibits the multi-scale fractal structure [21,33]. As a second example, we consider that the four bases "A", "C", "G", and"T" (or"U") of DNA sequences may be expressed by the four contraction mappings of the random IFS, presented in the Table 4. Generating the CGR with a few thousand points, one can obtain the graphical representation of the DNA sequence clearly showing fractal patterns ( Figure 13).  Table 3. IFS parameters of the pentaflake fractal construction restrict some of the moves of chaos game [33]. Figure 13 shows the CGR in the square ACGT of k = 4000 bases, with the eliminated sequence GC.
By considering the positions of the bases in the Figure 13 as the coordinates that are used in Eq. (6), we can compute the corresponding SAS spectrum. The structural properties, such as the overall size of the fractal, the fractal dimension, and the number of units are obtained from the Guinier, the fractal, and from the asymptotic regions, respectively. Although in the scattering from the CGR fractals, we can observe a succession in the minima in the fractal region, as it was the case for the Cantor and the pentaflake fractals, for the DNA these minima are smeared out. Thus, for DNA fractals, the iteration and the scaling factor can hardly be recovered.
This feature may indicate the existence of the multi-fractal structure in the CGR of DNA sequence [3]. Multi-scale fractals are characterized by the presence of different (multiple) scaling factors for some of the fractal units and they cannot be obtained directly from the SAS spectrum. However, as we can see from the left part of Figure 14, the lacunarity spectrum of  the image of the CGR of the DNA sequence can reveal at least one of the scaling factors that belong to the major part of units. The size of the image of the CGR of the DNA is considered to have the length L = 320 pixels. The maxima on the lacunarity spectrum correspond to the sizes of the gaps inside the image, and the maxima that show the periodicity in their behavior can reveal the scaling factors of the multi-fractal. Thus, the lacunarity technique can be used as the complementary analysis of the structural properties of multi-fractals.

Conclusions
In this chapter, we presented the structural characterization of deterministic mass fractals. The small-angle scattering and the lacunarity techniques are considered as complementary methods to analyze the structure of the nano-and microscale fractals. We present the theoretical foundations of both techniques, and show how they can be implemented in the investigating morphology of the fractals. The analysis is performed using an intuitive and an efficient implementation of Pantos and box-counting algorithms for calculating the spectra of the smallangle scattering and, the lacunarity, respectively.
The mathematical description of the general algorithm for the construction of the fractals, the iterated function systems (IFS) is explained. We show how to generate various types of the fractals, such as thin and fat fractals using deterministic IFS algorithm. We explain the difference in the construction of both models. Also the stochastic (random) IFS algorithm, the Chaos game representation (CGR) is used to reconstruct the structure of the deterministic fractal. The comparison of the structural characteristics of the CGR fractal with the deterministic one is presented.
For each introduced model, we calculate the scattering and the lacunarity spectrum, and we explain how to extract the main fractal and geometrical properties such as the fractal dimension, the iteration number, the scaling factor, the overall size, the sizes of the basic units, and the number of units in the system.