<<

TEACHING RESEARCH JOURNAL 17 SPRING 2020 Vol 12, no 1 Vol 12, no 1

Fractals, Self-Similarity, and Beyond Rohitha Goonatilake, Ray A. Casas

[email protected] Department of Mathematics and Physics, Texas A&M International University, 5201 University Boulevard, Laredo, Texas 78041-1900

Abstract: Since Mandelbrot coined the term in 1975, fractals and their have become a sensational topic in mathematics, especially with their creative applications to various fields of science (Mandelbrot, 1975). The study of fractal and are two examples of new fields in mathematics that have been popularized in the past 30 years, in large part due to the availability of high-speed computers. The Julia sets, for example, are complex 2 fractals that are formed from the sets of repelling periodic points of the mapping 푔푐(푧) = 푧 + 푐, where 푐 is a fixed complex-valued parameter. This article considers several properties of the Julia sets and of the Julia sets at various values of c. A brief overview of theories dealing with vertex figure and dual of a tessellation is provided to unify some other of the concepts associated with fractals. Attempts are being made to study some basic properties of fractals and self-similarity shapes and to some extent appreciate the attractiveness of fractals, chiefly in analytical points of view using some elementary computations. In conclusions, numerical construction of Julia sets is presented with the examples of finding their factional . This coverage is adequately considered for possible framework of the course design that could be developed and delivered in a typical college course.

Introduction Chaotic dynamics and fractal geometry have gained prominence in mathematics and applications for the past several decades. Due to their unique applications in various fields of science, fractals and their associated fractal dimension have been studied heavily. Because of the varied nature, both of the mathematical insights and the applications, the goal of this article is to make such results available to a larger mathematical audience providing to have an expository flavor. One notable example of a fractal is the Julia . The Julia sets were discovered and studied by the French mathematicians and during World War I (Kennedy et al., 2015). Due to his contributions in the study of iterations of complex rational functions, the Julia sets were named after Julia (Gulick, 2012). For years now, Julia sets have been studied for their complex

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 18 SPRING 2020 Vol 12, no 1 Vol 12, no 1 dynamical systems. However, there is still much work that can be done concerning their properties as fractals, specifically their fractal dimension. Over the past few decades, there has been significant advances in this . For example, Shishikura (1998) found that Julia sets with complex constants located on the boundary of the had fractal dimension 2 (Gleick, 1987). The primary focus of this article is to determine the fractal dimension of the Julia sets. The calculation of the fractal dimension of a is actually not as straightforward and of course, is dependent on the dimension and the parameter 푐. For example, a line is one-dimensional, and a plane is two-dimensional. However, what if someone asks for a geometric figure whose dimension is between one and two? In the beginning of the late nineteenth century, mathematicians have created numerous objects of uncertain dimension. The Koch is an example, named after the Swedish mathematician, , who first described it in 1904 (Dekking & Dekking, 2016). Furthermore, we study various types of functions in particular, their graphs. These functions and others are used to model physical phenomena in problem solving. However, in many instances, such as the shapes of waves and prices in the stock market, behavior does not correspond to reasonable functions. First, some known concepts and related discussion from the references cited are presented to make this article readable for those who are new to the topic. Fractals and Self-Similarity A property that can be clearly observed from the repeated magnification of images of the sets is that of self-similarity. Many fractals express this property. However, when Mandelbrot first defined the term ‘fractal’, he did not express it in terms of only self-similarity. In fact, he considered it in terms of dimensions. Given below are Mandelbrot’s definitions of fractals and self-similarity (Falconer, 2013). Definition 1. Fractals: Fractals are geometrical figures that are generated by starting with a very simple that grows through the application of rules. In many cases, the rules to make the figure grow from one stage to the next involve taking the original figure and modifying it or adding to it. This process can be repeated recursively an infinite number of times. Some other known fractals are , Stairs, Koch anti-snowflake curve, , Peano-Gasper curve, Bush One, Bush Two, Bush Three, , and Jurassic Park fractals (Bourke, 2006). Definition 2. Self-Similarity: Self-similarity means that each small portion, when magnified, can reproduce exactly a larger portion. In 1975, Benoit B. Mandelbrot, a Fellow at IBM Thomas J. Watson Research Center, published the first comprehensive study of the geometry of self-similar shapes such as the Koch curve, the Sierpinski gasket and the (Pickover, 1998). Fractals are not simply abstract

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 19 SPRING 2020 Vol 12, no 1 Vol 12, no 1 creations of mathematicians. Indeed, intense ongoing scientific research suggest that many, and possibly most of the physical and life processes are what can be described as chaotic, and the geometric shapes of chaos are fractals. The fractal geometry of nature popularized a form of geometry that attempts to study chaotic behavior. The following discussion provides a somewhat introduction to the notion of self-similarity, which is part of the modern field of study. Examples of Reptiles Fractals are a relatively new mathematical concept associated with the geometry of irregular shaped objects. Generally, more attractive fractal gaskets result from reptiles with smaller numbers of component tiles. The reptiles are comprised of tiles of more than one size. As we have seen tiles, when arranged in the proper way, produced new tiles of the same shape. Equilateral triangles are simple examples of reptiles. It is also observed that as new shapes are constructed, they are similar to each of the previous shapes. Some trees may also exhibit the idea that begin with two branches and then grow two similar ones at the end of each new branch. A more intricate pattern can be constructed in this manner. To construct the Koch curve, begin with a line segment. Next, replace the middle third by an equilateral triangular bump, resulting in a 4-segment polynomial curve. In the third step, a triangular bump is added to each side of the curve, yielding a curve with 16 sides. In the first iteration of the process, the original segment is replaced by a curve called the generator. At each iteration, every segment of the developing is replaced with a suitably scaled version of the generator.

Figure 1. Construction of the Koch Curve As displayed in Figure 1, this construction could begin with an equilateral triangle. Next, equilateral triangles are constructed on the middle thirds of the original triangle. The curve formed by repeating this process indefinitely is known as the Koch curve. Notice how each small triangle formed is similar to the proceeding triangle (L-System: Lindenmayer, 1968). The Koch curve is said to be self-similar, since the curve looks the same when magnified. In addition to being self- similar, the Koch curve has a finite area, but an infinite perimeter. These two facts will be proved later in the article. These figures are often referred to as stars, the first one is a three-pointed star and the second one is a six-pointed star. If this pattern of constructing a new equilateral triangle is continued indefinitely, the resulting figure is called Koch curve or Koch snowflakes as displayed

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 20 SPRING 2020 Vol 12, no 1 Vol 12, no 1 in Figure 2. The Koch curve has many interesting properties, but of special interest is self- similarity. That is, if fragments of the curve are viewed with highly powered microscopes, the enlargements all appear identical. This unlimited ''roughness'' of the Koch curve suggests that the dimension is larger than one.

Figure 2. Koch Curve (Snowflake)

The shape of the Sierpinski gasket (triangle) results from starting with an equilateral triangle and removing successively smaller ones from the centers of the newly formed triangles. This pattern is continued indefinitely as in Figure 3.

Figure 3. Sierpinski Gasket

In the discussion to follow, a set of elementary results is presented to see how these continue and what their basic properties are as they develop. The Plusses fractals are the simplest fractals that can be studied in some generalities. As iterations proceed, the process continues by adding a + sign to each line-end, as depicted in Figure 4. To begin, start with a + sign and spread the fractals by adding a half-sized + in each of the four line- ends. Repeating the exact same process recursively as many times as desired to obtain the Plusses fractal is undertaken. Notice how the + sign grows into a rhombus in very few simple steps

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 21 SPRING 2020 Vol 12, no 1 Vol 12, no 1

(Bulaevsky, as of 2020). Furthermore, we will be able to count the number of +’s in each stage to see how quickly its grows.

Figure 4. Plusses Fractals

Proposition 1. The total number of +'s in each iteration, n = 1,2,3,is given by the formula 1+ 2{3n−1 −1} = 2 3n−1 −1.

Proposition 2. If the length of one segment of + signs is one unit, then the area of the limiting rhombus is 8 square units. Proof. Half of the limiting length of the diagonal is 2, since it grows a half-sized + in each of the three line-ends of each + are added and hence, Figure 5 is constructed,

Figure 5. Limiting Rhombus

1+ (1/ 2) + (1/ 2) 2 + (1/ 2)3 ++ (1/ 2) n + = 2. This results in the area of the rhombus is 2 2 2 = 8 square units.

Proposition 3. The has an infinite perimeter. Proof. In every stage of the successive construction, the perimeter of the previous shape is increased by a factor, 4 / 3 of the original shape. Since | 4 / 3 | 1, the perimeter of the given Koch snowflake increases indefinitely and has an infinite perimeter.

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 22 SPRING 2020 Vol 12, no 1 Vol 12, no 1

Proposition 4. The number of outward-pointed vertices in every stage of iteration of a Koch snowflake is given by the formula 2 + 4 n−1 , where n = 1,2,3,.

Proposition 5. The Koch snowflake has a finite area in every stage of the iteration. For an equilateral triangle having the side length equal to two units, the limiting area added to the original figure is 8√3/5 square units.

Proof. In every stage of iteration, there will be an increase of a1/(3) 2 multiple of the area to the original triangle as in Figure 6.

Figure 6. Construction of Koch Snowflake Table 1 summarizes these developments in every stage of iteration as they progress in the construction of Koch Snowflake. The proof now follows from the following area formula for sum of triangular ,

 3 3   3 / 32n 3 4n−1 = (2 / 3)2n =3 3 / 5. This results in the total area of the limiting figure n=1 4 n=1 to be of 3 3 / 5 + 3 = 8 3 / 5.

As it is evident, fractals such as the Koch snowflake has features that are clearly non-Euclidean in nature, namely, finite areas contained within an object of infinite perimeter. Proposition 6. The infinite structure of a given Koch snowflake cannot develop outside the circle of a radius 3 3 / 2 and the center is at attitude, and two-thirds away from the vertex of the original triangle (by a proportional constant).

Proof. The assertion follows from the fact that this circle has a radius ( 3 + 3 / 2) / 2.

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 23 SPRING 2020 Vol 12, no 1 Vol 12, no 1

Proposition 7. Every stage of the successive construction of a Koch snowflake, an additional area amounts to 3/ 2 times the area of the original triangle is added to the area of the original triangle. The following proposition is somewhat obvious. However, we provide a proof for its assertion using some basic properties of its mere construction and sum of the geometric series. Proposition 8. In the construction of a given Sierpinski gasket, the sum of the areas of the triangles removed will occupy the entire area of the original triangle.

Proof. Let n = 1be the initial state of the original equilateral triangle subject to successive construction. Let side length of the original triangle be 2 units. Note that the area of the original equilateral triangle is 3 square units. We can now complete the following table in proving the assertion. n 1 2 3  n No. of triangles removed 0 32-2 33-2  3n-2 Area of each triangle 3 / 41−1 3 / 42−1 3 / 43−1  3 / 4n−1

Now, sum of areas of removed triangles equal to

  3n−2  3 / 4n−1 = 3  3n−2  (1/ 4n−1 ) n=2 n=2  n = 3 / 4  (3/ 4) n=0 = 3 / 41/(1− 3/ 4) = 3 .

The latter is the area of the original triangle. Proposition 9. The number of triangles pointing down and that of pointing up in each stage of iteration of a Sierpinski gasket are given by

1. 3n−2 + 3n−3 ++1 for n  2 and 0 for n = 1, and 2. 3n−1 , respectively.

The Koch anti-snowflake curve is created by reversing the orientation of the generator used in the Koch snowflake, causing the fractal to grow inward rather than outward. Analogous to some of the results established above can be similarly obtained. Many fractals repeat its original shapes that have many different figures of sophistication. However, the around them in tessellations become iterating shapes themselves and provides a major part in the design by repeating their geometric fonts that keep touching each other on a plane.

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 24 SPRING 2020 Vol 12, no 1 Vol 12, no 1

Tessellations and Vertex Arrangements A polygonal region is a polygon together with its interior. An arrangement of polygonal regions having only sides in common that completely covers the plane is called a tessellation. If the tessellations consist of regular polygons, then the tessellations are called regular (Musser, Burger, & Peterson, 2000). Generally, tessellations are different from some known origami tessellations, containing cyclically overlapping self-similar patterns at each corresponding intersection of weaves on both front and back. For the underlying geometry and combinatorics behind tessellations, this provides the framework for creative, artistic expression. The choice of a particular style modifies the mathematical structure unique to the construction, either obscuring or enhancing their internal symmetries. For example, multiple layers of triaxial weaving with algorithmic color placement can create a repeating, self-similar triangular tessellation to display its beauty (Mathematical Art Exhibition, 2019).

Figure 7. Regular Tessellation with 6 Sides Definition 3. Vertex Arrangement: In a pattern of the configuration of m number of regular polygons, each of sides ( gons) meeting at a vertex is (n,n,,n), where is repeated n n −  n m m times number of times. Theorem 1. Tessellations with regular n − gons: Only regular 6-gons, 4-gons, or 3-gons can form tessellations of the plane by themselves.

Figure 8. Possible Regular n-gons for Tessellations

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 25 SPRING 2020 Vol 12, no 1 Vol 12, no 1

Definition 4. Semiregular Tessellation: Tessellations using two or more regular polygons are called semiregular tessellations, if their vertex arrangements are identical.

Figure 9. Semiregular Tessellation

The artist M. C. Escher (Locher, 1972) made use of tessellations with polygons to create tessellating patterns. In this entry, a brief account of theories dealing with vertex figure and dual of a tessellation is provided (Foulger & Jurdy, 2007). Definition 5. Vertex Figure: In a given tessellation, first select a vertex and then connect the midpoints of the sides of polygons meeting at that vertex; the resulting figure is called the vertex figure. Definition 6. Dual of a Tessellation: A dual of a tessellation is formed by connecting the centers (orthocenter) of polygons that share a common side.

Figure 10. Dual of Tessellation

In the following, the characteristics of duals of regular polygons are provided for 3-gons, 4-gons or 6-gons are 6-gons, 4-gons or 3-gons respectively for respective polygons of side length 2 units.

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 26 SPRING 2020 Vol 12, no 1 Vol 12, no 1

n − gons 3 − gons 4 − gons 6 − gons Area of the n − gon 3 4 6 3 Area of the vertex figure 3 3 / 2 2 3 3 / 4 Area of the dual figure 2 3 4 3 3

Sum of areas of polygons at vertex 6 3 16 18 3 Perimeter of the n - gon 6 8 12 Perimeter of the vertex figure 6 4 2 3 3 Perimeter of the dual figure 4 3 8 6 3

Proposition 10. The following conclusions hold for a regular tessellation.

1. 2  Area of the dual = Perimeter of the dual. 2. nArea of the dual = Sum of the areas of the polygons meet at the vertex point. 3. Number of sides of the corresponding dual  Area of the n − gon = Sum of the areas of the polygons that meet at the vertex point. 4. If a tessellation is formed by using n − gons, then its dual is tessellation formed by m − gons, where m and n satisfy the relations; 1/ n +1/ m = 1/ 2.

Numerical Constructions The other two most well-known fractals are the Mandelbrot and Julia sets. The fractals are obtained by successive iterations. In the case of Mandelbrot set, it is the set of all complex numbers for which the function does not diverge when iterated and remains bounded. In the Mandelbrot set, 2 the points on the complex plane are put into the series 푧푛+1 = 푧푛 + 푐, where 푧0 is the point (0,0), and 푐 is the point.

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 27 SPRING 2020 Vol 12, no 1 Vol 12, no 1

Figure 11. An Example of Mandelbrot Set

The equation is computed until |푧푛| > 2, or the set of number of iterations is reached. Depending on how much iteration required for |푧푛| > 2, or |푧푛| ≤ 2, the points are assigned a certain color. In the latter case, it is considered a part of the Mandelbrot set and is colored black. To construct the Julia set, 푧 is considered the current point and 푐 is a seed value, taken from the Mandelbrot set held at a constant for any given point. To find out the value of 푐 that do not belong to the 2 Mandelbrot set, we consider 푔푐(푧) = 푧 + 푐, say, f (z). Let |푐| = 2 + 푑 with d  0. i.e., 푐 be any complex number located 2 units or more from the origin and let 푧 be any point such that |푧| ≥ 푐. Thus, |푓(푧)| = |푧2 + 푐| ≥ |푧|2 − |푐| ≥ |푧|2 − |푧| = |푧|(|푧| − 1) ≥ |푧|(1 + 푑) and since (1+ d)  1, we have | f (z) || z | f (z) is always further away from the origin than z. Consequently Mandelbrot set must lie within a circle of radius 2 centered at the origin. Julia sets are normally defined in the context of iterations that is formulated below.

Definition 7. Iterations: Given a function 푓(푥) and a value from that function's domain 푥0, we will define the iterates of 푥0 for 푓 in the following manner: the first iteration is defined as 푥1 = 1 2 푓 (푥0) = 푓(푥0), the second iteration is defined as 푥2 = 푓 (푥0) = 푓(푓(푥0)), and, generally, the 푛 푛 푛th iteration is defined as 푥푛 = 푓 (푥0) = 푓(푓 (푥0)). The sequence of iterations of 푥0, 2 {푥0, 푓(푥0), 푓 (푥0), … }, is called the orbit of 푥0 (Gulick, 2012). When iterating points from a set, one can find special points, which stay the same after iteration. In some cases, the iterations may create a repeating sequence within their orbit. These special cases are called fixed points and periodic points, respectively, and are defined as follows. Definition 8. Fixed Point and Periodic Point: Given a function 푓(푧) and a value from that function's domain 푧0, we call 푧0 a fixed point of 푓 if 푓(푧0) = 푧0. In general, we call 푧0 a periodic point of 푛 period 푛 or, more simply, a period-푛 point if there exists some 푛 such that 푓 (푧0) = 푧0 and if the 1 2 푛−1 values 푧0, 푓 (푧0), 푓 (푧0), …, 푓 (푧0) are all distinct. The collection of all distinct iterations of 1 2 푛−1 periodic points {푧0, 푓 (푧0), 푓 (푧0), …, 푓 (푧0)} are known as 푛-cycles (Alligood, Sauer, & Yorke, 1996). One unique property that fixed points and repelling points may have is their attraction or repulsion of iterated points around them. Attracting fixed and periodic points essentially cause points in their neighborhood to converge to their orbit whereas repelling fixed and periodic points cause points in their neighborhood to diverge from their orbits. We formally define all four cases below.

Definition 9. Attracting and Repelling Fixed Point: Assume that 푧0 is a fixed point of a complex function 푓. Then 푧0 is attracting provided that there is a disk 푈 in the plane centered at 푧0 such 푛 that if 푧 is in the domain of 푓 and in 푈, then |푓 (푧) − 푧0| → 0 as 푛 increases without bound. By contrast, a fixed point 푧0 is repelling if there is a disk 푈 centered at 푧0 such that if 푧 is in the domain of 푓 and in 푈 and 푧 ≠ 푧0, then |푓(푧) − 푧0| > |푧 − 푧0| (Devaney, 1992).

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 28 SPRING 2020 Vol 12, no 1 Vol 12, no 1

Definition 10. Attracting and Repelling Periodic Point: We say that 푧0 is an attracting period-푛 푛 point of a complex function 푓 if 푧0 is an attracting fixed point of 푓 . Similarly, we say that 푧0 is a 푛 repelling period-푛 point of a complex function 푓 if 푧0 is a repelling fixed point of 푓 (Gulick, 2012). Julia Sets Julia sets have been defined in several different yet equivalent ways since their discovery. For this, we specifically consider Definition 11 in terms of repelling periodic points. Before we do this, let 2 us consider a special case from the family of complex quadratic functions: 푔푐(푧) = 푧 + 푐 where 푐 is a complex-valued fixed parameter. Now we may formally define a Julia set for a specific value of 푐 in terms of the function 푔푐. Definition 11. Julia Set: Let 푐 be any complex number. The smallest closed set in the complex plane that contains all repelling fixed points and all repelling periodic points of 푔푐 is called a Julia set of 푔푐, and is denoted 퐽푐 (Gulick, 2012). In general, the Julia set can be defined for any complex rational function. However, we will consider the most well-known case. For this specific family, several properties remain constant for any Julia set despite changes in the value of 푐. We provide many of these properties in the following as provided in (Elaydi, 2000 & Carleson, 2013). Theorem 2. The following are a collection of results from (Gulick, 2012).

(a). For every complex number 푐, the Julia set 퐽푐 is nonempty. (b). If |푧| > |푐| + 1, then the orbit of 푧 for 푔푐 is unbounded. (c). If 푧 is in 퐽푐, then |푧| ≤ |푐| + 1, so that 퐽푐 is a bounded subset of the complex plane. (d). 퐽푐 is invariant under 푔푐. In fact, 퐽푐 = 푔푐(퐽푐). (e). 퐽푐 is symmetric with respect to the origin. (f). If 푐 is real, then 퐽푐 is symmetric with respect to both the 푥 and the 푦 axes.

Now, each of these properties with the exception of (b) and (d) can be seen through a graph of the Julia set. As shown in Table 2, Julia sets can vary greatly depending on the value of 푐. In general, Julia sets for 푔푐 can be classified into 5 different types of sets (Gulick, 2012):

A. 퐽0 is the unit circle. B. 퐽푐 is a simple closed curve that is nowhere differentiable, provided that 푔푐 has an attracting fixed point and 푐 ≠ 0. C. 퐽푐 is connected and encloses a figure with interior, but is more complicated in shape, provided that 푔푐 has an attracting cycle that is not a fixed point.

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 29 SPRING 2020 Vol 12, no 1 Vol 12, no 1

D. 퐽푐 is connected but does not enclose a figure with interior, provided that some iterate of 0 is a fixed point or is periodic. These Julia sets are called dendrites.

E. 퐽푐 is a totally disconnected, two-dimensional set, provided that the orbit of 0 is unbounded. These Julia sets are called Fatou dusts. Clearly, the simplest type of Julia set is Type A. It is much more difficult to fully examine Julia sets of the other types. However, these types of Julia sets have been more popular for their artistic appeal in the mathematical community. In fact, these types of Julia sets are related to a special type of set known as the fractal, which the discussions follow in the next section. Fractals Dimensions Some of the interesting aspects of fractals have to do with looking at how some of their dimensions evolve as they grow from one iteration to another. Two problems that deal with fractal dimensions are: 1) Area and length of the fractals and 2) Total number of self-similar figures. Two types of dimension are associated with geometrical objects. One is topological dimension and other one is fractal or capacity dimension, as provided in Definitions 12 and 13 (Mandelbrot, 1983).

푛 Definition 12. A set 퐹 ⊆ ℝ has topological dimension dim푡(퐹) = 0 if for any point 푥 ∈ 퐹, there exists an open ball around 푥 that does not intersect any point of 퐹. The set 퐹 has topological dimension dim푡(퐹) = 푘 > 0 if any open ball around 푥 intersects 퐹 at a set of points of topological dimension 푘 − 1 on the ball’s boundary, and 푘 is the smallest integer for which this holds (DeLorto, 2013). In order to better understand the topological dimension, several different types of sets are considered. Point sets always have topological dimension 0 since we can always create a ball around one of the points so that the ball does not intersect any of the other points (Figure 11).

Figure 12. Point Set with Topological Dimension 0

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 30 SPRING 2020 Vol 12, no 1 Vol 12, no 1

For , open balls centered around any point on the curve will always intersect the curve at a point set. Since point sets have topological dimension 0, curves must always have topological dimension 1 as in Figure 12.

Figure 13. Curve with Topological Dimension 1

For any filled in shape such as discs, it is easy to check that these sets have topological dimension 2. Furthermore, it is easy to check that filled balls and cubes have topological dimension 3. It is important to note that the topological dimension is always an integer. However, this may not always be the case for the capacity dimension defined in Definition 13. Definition 13. Let 푆 be a subset of ℝ푛, where 푛 = 1, 2, or 3. Let 푁(휖) is the smallest number of 푛-dimensional boxes of side length 휖 required to completely cover the subset 푆. The capacity ln 푁(휖) dimension (or fractal dimension) of 푆 is given by dimc 푆 = lim if the limit exists (Gulick, 휖→0 ln (1/휖) 2012). A fractal is set in a metric space for which its capacity dimension strictly exceeds its topological dimension (Xie, 1993). The capacity dimension is then referred to as the fractal dimension as long as this condition holds (Long & DeTemple, 2000). Mandelbrot initially defined a fractal to be a set whose fractal dimension is strictly larger than its topological dimension. Thus, 푁(휀) = 1 1 ( )푆 where ( ) is the size of the grid and 푁 is the number of grid cell used in measuring the object 휖 휀 and 푆 is a constant. Then, the Koch curve has dimension 푆, given by the equation 4 = 3푆. That is, 푆 = 1.2618595. Shapes that occur in nature and exhibit self-similarity somewhat are broccoli, acorns, and breaking waves. For practical consideration, grid method or ruler method may be used to evaluate the fractal dimension of a complicated fractal structure in general (Thomas, 2002). The best way to describe this function is to place a set on a grid. For example, consider the circle 푟 = 2 on a grid of boxes with side length, 휖 = 1/10.

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 31 SPRING 2020 Vol 12, no 1 Vol 12, no 1

Figure 14. Circle with Radius 2 on Grid with 휖 = 1/10

Calculation of 푁(휖) in this case simply requires us to count the number of boxes on the grid that cover the circle. Thus, 푁(1/10) = 76, giving that 푆 = 1.8808. The capacity dimension is essentially a measurement of the ratio between 푁(휖) and 휖 as 휖 becomes infinitesimal. For certain types of sets, the capacity dimension and the topological dimension are equal. For example, finite point sets have capacity dimension 0, lines have capacity dimension 1, and filled squares have capacity dimension 2. However, sets such as Sierpinski triangle and the Koch snowflake have been shown to have noninteger capacity dimensions despite both sets having topological dimension 1. The capacity dimension is known to always be greater than or equal to the topological dimension (Buyalo & Lebedeva, 2007). To determine whether a set is a fractal or not, it is practical to determine if its capacity dimension is noninteger. By calculating ln(1/휖) and ln 푁(휖) for very small values of 휖, we can use each pair as a point so that we may perform to determine the slope of the line formed from these points, and hence, approximate the capacity dimension (Gulick, 2012).

Fractal Dimension of Julia Sets In order to calculate the capacity dimension for the Julia sets, we apply the linear relation method to the graphs of the Julia sets through the ‘boxcount’ function in MATLAB. The relevant MATLAB codes for the constructions of Julia set plot and fractal dimension are found in (Vermillion, 2019) and (Moisy, 2019), respectively. The accuracy of the estimation depends on the resolution of the image. A higher number of pixels allow for smaller grids in the approximation

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 32 SPRING 2020 Vol 12, no 1 Vol 12, no 1 of the capacity dimension. Using images with resolutions of 5,000 by 5,000 pixels, the capacity dimension of the Julia sets are given along with a few other examples in Table 2 for some chosen values of 푐.

Table 2. Fractal Dimension of Julia Sets for Given Values of 푐

Constant 푐 of 퐽푐 Approximate Fractal Graph of 퐽푐 Dimension

N/A (Since the Julia set at c = 0 is c = 0 the unit circle, it has no fractal dimension)

c = -0.5 + 0.5i 1.5055

c = 0.32 + 0.043i 1.7815

c = i 1.8307

c = 0.12 - 0.74i 1.7841

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 33 SPRING 2020 Vol 12, no 1 Vol 12, no 1

c = -0.12 - 0.77i 1.7708

c = -0.4 + 0.6i 1.7841

For each set, the estimation of the fractal dimension was noninteger, implying that these sets are all fractals. However, consider the approximate fractal dimension of the Julia sets with constants 푐 = 0.12 − 0.74푖 and 푐 = −0.4 + 0.6푖. Since these Julia sets belong to the same category, it is possible that their fractal dimensions should be similar. However, images with higher resolution should provide better estimations to help verify the results.

Course Design and Curricula It is important to emphasize the possible course design of this coverage towards a meaningful curriculum development that is not generally viewed as a systematic set of interrelated processes. In mathematics, a fractal is a self-similar subset of whose fractal dimension strictly exceeds its topological dimension (Xie, 1993). Fractals appear the same at different levels, as illustrated in Figures 1 – 4, in successive magnifications of the Mandelbrot set (Cole, 1995). The study of fractals is extremely interesting for beginners in mathematics. However, for effective mathematics teaching practices, it is vitally important to establish mathematics goals to focus learning and situate goals within learning progressions to guide instructional decisions. The implement tasks meritoriously promote reasoning and problem solving among students. Expanded curriculum could include the areas of algorithm and programming, perhaps for the mathematically rich audience. Secondly, the teacher can emphasize recursive procedures to validate theoretical results. Moreover, the relevant questions in this direction normally asked and to their responses are outlined in the discussions to unfold below. 1. How would the syllabus of the course look like? The purpose of a typical course coverage is to examine how students understand fractals depending on their previous understandings revolving around some basic properties, concepts, and mathematical operations associated with fractals. In recent years, fractal geometry appears in many mathematics curricula with the

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 34 SPRING 2020 Vol 12, no 1 Vol 12, no 1

reforms in mathematics education. Naturally, the course syllabus revolves around fractals, graphics, and mathematics education that focuses on three main themes. First, it will have a lengthy introduction to fractals and tessellations. Proving some basic results involving them requires some elements of computation including the properties of geometric figures and series. This certainly expands on the introductory materials. Lastly, it presents computer programming as a key method for solving mathematical problems using MATLAB built on a gentle introduction to MATLAB. 2. What concepts that would be emphasized in teaching? Effective teaching of mathematics engages students in solving and discussing tasks promoting mathematical reasoning and problem solving. Fractals require theoretical knowledge, experiment burden, and computation capabilities allowing multiple entry points and varied solution strategies to impact mathematical novelty. Effective teaching of mathematics also engages students in making connections among mathematical representations to deepen their understanding of concepts and procedures and use as necessary tools for problem solving. 3. How do these concepts connect with the standard college mathematics courses? This course collects materials about fractals' role in mathematics and mathematics education to ease students experience in grasping conceptual difficulties regarding them. Many teachers developed fractals courses on their own in isolation from one another. This is an attempt to exploring fractal dimensions by theory and experimentation. This course provides insight for those who want to advance a college course beyond typical discrete mathematics and geometry courses. 4. What could be the teaching experiment in such a course? The teaching experiment in such a course facilitates a meaningful mathematical discourse among students to build shared understanding of ideas by analyzing and comparing student approaches and arguments (NCTM, 2014).

Conclusions This article provided a glimpse of fractal and fractal dimension aspects of the subject including the calculation of the capacity dimension for the Julia sets for consideration of a possible college course. As shown in the last section, there is, however, adequate prospect for improvement in determining the fractal dimension of the Julia set. Other methods of improving the approximation have been proposed by changing the function used to compute the capacity dimension (Saupe, 1987). It certainly can be time consuming with computational constraints when implementing the options. However, with more time and computational capabilities, it is possible to compare the approximations with the proposed functions as well as higher image resolutions. Finally, the discussion provided the extent of a course design and curricula that benefits a successful course development in this effort. Acknowledgement

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 35 SPRING 2020 Vol 12, no 1 Vol 12, no 1

We wish to thank two anonymous reviewers for their careful reading of our manuscript and many insightful comments and suggestions to improve it. We feel that this has resulted in a stronger manuscript, as a result. Our colleague, Sofia C. Maldonado assisted us in the many revisions of the draft for us to bring this manuscript to the current form, and we greatly appreciate her support.

References Alligood, Kathleen T., Sauer, Tim D., and Yorke, James A. (1996). Chaos: An Introduction to Dynamical Systems, Springer-Verlag New York, Inc. Bourke, Paul (2006). Fractals, chaos. Retrieved on July 17, 2006, from http://astronomy.swin.edu.au/~pbourke/fractals/ Bulaevsky, Jacobo (as of 2020). Fractals -- An Introduction, http://ceadserv1.nku.edu/longa//classes/fractals/britton.disted.camosun.bc.ca/fractals_arcytech/in tro.html Accessed 25 February 2020. Buyalo, Sergey V. and Lebedeva, Nina D. (Translated by: S. Buyalo), (2007). Dimensions of locally and asymptotically self-similar , Algebra i Analiz, tom 19 (2007), nomer 1, St. Petersburg Math. J. 19 (2008), pp. 45-65. Carleson, Lennart, and Gamelin, Theodore W. (2013). Complex dynamics. Springer Science & Business Media, 2013. Cole, Blaine J. (1995). Fractal time in animal behaviour: the movement activity of Drosophila, Animal Behaviour, Vol. 50, Is. 5, 1995, pp. 1317-1324. Dekking, E. W. and Dekking, F. M. (2016). Helge von Koch′s Snowflake Curve Revisited, the American Mathematical Monthly, Vol. 123, No. 2 (February 2016), pp. 181-184, Taylor & Francis, Ltd. DeLorto, Robert (2013). Fractal dimension and Julia sets, unpublished M. Sc., Eastern Washington University, 2013. Devaney, Robert L. (1992). A First Course in Chaotic Dynamical Systems: Theory and Experiment. Addison-Wesley, 1992. Elaydi, Saber N. (2000). Discrete Chaos. Chapman & Hall/CRC, 2000. Falconer, Kenneth (2013). Fractals: A very short introduction, Oxford University Press, Oxford, 2013.

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 36 SPRING 2020 Vol 12, no 1 Vol 12, no 1

Foulger, Gillian R. and Jurdy, Donna M. (2007). Plates, Plumes, and Planetary Processes, Geological Society of America (October 31, 2007). Gleick, James (1987). Chaos: Making a New Science, Penguin Books Co., New York, 1987. Gulick, Denny (2012). Encounters with Chaos. 2nd ed., CRC Press, 2012. Kennedy, Stephen F., et al., editors (2015). A Century of Advancing Mathematics. 1st ed., Mathematical Association of America, 2015. Lindenmayer, A. (1968). Mathematical models for cellular interactions in development. i. filaments with one sided inputs. Journal of Theoretical Biology, Vol. 18, pp. 280–289, 1968. Locher, Johannes L. ed., (2015). The World of M.C. Escher, (1898-1972). Long, Calvin T. and DeTemple, Duane W. (2000). Mathematical Reasoning for Elementary Teachers, Second Edition, Addition Wesley Longman Inc., 2000. Mandelbrot, Benoit B. (1975). Les objets fractals: forme, hasard et dimension, Paris: Flammarion, 1975. - 190 pp, (Nouvelle bibliothèque scientifique). Mandelbrot, Benoit B. (1983). The Fractal Geometry of Nature, Freeman and Co., New York, 1983. Mathematical Art Exhibition (2019). The 2019 Mathematical Art Exhibition, an online image gallery of selected artworks in the juried exhibition held at the 2019 Joint Mathematics Meetings in Baltimore Maryland, January 2019 http://www.ams.org/publicoutreach/math- imagery/2019-Exhibition. Moisy, Frederic (2019). Boxcount: Fractal Dimension Using the 'Box-Counting' Method for 1D, 2D and 3D sets (https://www.mathworks.com/matlabcentral/fileexchange/13063- boxcount), MATLAB Central File Exchange. 2019. Retrieved December 11, 2019. Musser, Gary L.; Burger, William F., and Peterson, Blake E. (2000). Mathematics for Elementary Teachers; A. (2000). Contemporary Approach, Fifth Edition, John Wiley & Sons Inc., 2000. NCTM (2014). National Council of Teachers of Mathematics. (2014). Principles to actions: Ensuring mathematical success for all. Reston, VA Pickover, Clifford A. (1998). Chaos and Fractals: A Computer Graphical Journey: Ten Year Compilation of Advanced Research, Vol. 1167 of International Congress Series, Elsevier, 1998.

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 37 SPRING 2020 Vol 12, no 1 Vol 12, no 1

Saupe, Dietmar (1987). Efficient Computation of Julia Sets and Their Fractal Dimension, Physica D: Nonlinear Phenomena, Vol. 28, No. 3, 1987, pp. 358–370. Shishikura, Mitsuhiro (1998). The of the Boundary of the Mandelbrot Set and Julia Sets. Annals of Mathematics (2), Vol. 147, No. 2, 1998, pp. 225–267. JSTOR, www.jstor.org/stable/121009. Thomas, David A. (2002). Modern Geometry, Brooks/Cole Thomson Learning Publishing Co., 2002 Vermillion, Julia (2019). Function for Plotting Julia Set (https://codereview.stackexchange.com/questions/145752/function-for-plotting-julia-set), Stack Exchange. 2016. Retrieved on December 11, 2019. Xie, H. (1993). Fractals in rock mechanics, A.A. Balkema Publishers, Rotterdam, 1993.

Appendix: Codes for Julia Set and Fractal Dimension (Moisy, 2019) a) Julia Set Plot Code (Vermillion, 2019) function colour = julia(c, total_iterations, image_size, limits) % Calculates julia set by iterating z = z^2 + c, where z and c are complex, % and recording when z reaches . % % Inputs: % % c Fixed complex number, of form a + bi % total_iterations Number of iterations of z = z^2 + c % image_size 2D vector with number of complex coordinates in % x and y directions % limits Vector with 4 elements: min x, max x, min y, max y % % Outputs:

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 38 SPRING 2020 Vol 12, no 1 Vol 12, no 1

% % colour Matrix of doubles, with size equal to image_size. % Plotting this matrix will produce a julia set im_step = (limits(4) - limits(3)) / (image_size(2) - 1); re_step = (limits(2) - limits(1)) / (image_size(1) - 1); reals = limits(1) : re_step : limits(2); % Real numbers imags = limits(3) : im_step : limits(4); % Imaginary numbers z = bsxfun(@plus, reals(:), (imags(:) * 1i)'); % Complex coordinates colour = inf(size(z)); % Colour of Julia set for iteration = 1:total_iterations index = isinf(z); % Only perform calculation on the z values that are less than infinity z(~index) = z(~index).^2 + c; % Colour depends on number of iterations to reach infinity colour(index & isinf(colour)) = iteration; end colour = colour'; % Transpose so that plot will have reals on the x axis end b) Fractal Dimension Code (Moisy, 2019). function [n,r] = boxcount(c,varargin) % BOXCOUNT Box-Counting of a D-dimensional array (with D=1,2,3).

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 39 SPRING 2020 Vol 12, no 1 Vol 12, no 1

% [N, R] = BOXCOUNT(C), where C is a D-dimensional array (with D=1,2,3), % counts the number N of D-dimensional boxes of size R needed to cover % the nonzero elements of C. The box sizes are powers of two, i.e., % R = 1, 2, 4 ... 2^P, where P is the smallest integer such that % MAX(SIZE(C)) <= 2^P. If the sizes of C over each dimension are smaller % than 2^P, C is padded with zeros to size 2^P over each dimension (e.g., % a 320-by-200 image is padded to 512-by-512). The output vectors N and R % are of size P+1. For a RGB color image (m-by-n-by-3 array), a summation % over the 3 RGB planes is done first. % % The Box-counting method is useful to determine fractal properties of a % 1D segment, a 2D image or a 3D array. If C is a fractal set, with % fractal dimension DF < D, then N scales as R^(-DF). DF is known as the % Minkowski-Bouligand dimension, or Kolmogorov capacity, or Kolmogorov % dimension, or simply box-counting dimension. % % BOXCOUNT(C,'plot') also shows the log-log plot of N as a function of R % (if no output argument, this option is selected by default). % % BOXCOUNT(C,'slope') also shows the semi-log plot of the local slope % DF = - dlnN/dlnR as a function of R. If DF is contant in a certain % range of R, then DF is the fractal dimension of the set C. The % derivative is computed as a 2nd order finite difference (see GRADIENT). % % The execution time depends on the sizes of C. It is fastest for powers % of two over each dimension.

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 40 SPRING 2020 Vol 12, no 1 Vol 12, no 1

% % Examples: % % % Plots the box-count of a vector containing randomly-distributed % % 0 and 1. This set is not fractal: one has N = R^-2 at large R, % % and N = cste at small R. % c = (rand(1,2048)<0.2); % boxcount(c); % % % Plots the box-count and the fractal dimension of a 2D fractal set % % of size 512^2 (obtained by RANDCANTOR), with fractal dimension % % DF = 2 + log (P) / log(2) = 1.68 (with P=0.8). % c = randcantor(0.8, 512, 2); % boxcount(c); % figure, boxcount(c, 'slope'); % % F. Moisy % Revision: 2.10, Date: 2008/07/09 % History: % 2006/11/22: v2 .00, joined into a single file boxcountn (n=1,2,3). % 2008/07/09: v2 .10, minor improvements % control input argument error(nargchk(1,2,nargin)); % check for true color image (m-by-n-by-3 array) if ndims(c)==3 if size(c,3)==3 && size(c,1)>=8 && size(c,2)>=8

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 41 SPRING 2020 Vol 12, no 1 Vol 12, no 1

c = sum(c,3); end end warning off c = logical(squeeze(c)); warning on dim = ndims(c); % dim is 2 for a vector or a matrix, 3 for a cube if dim>3 error('Maximum dimension is 3.'); end % transpose the vector to a 1-by-n vector if length(c)==numel(c) dim=1; if size (c,1)~=1 c = c'; end end width = max(size(c)); % largest size of the box p = log (width)/log(2); % nbre of generations % remap the array if the sizes are not all equal, % or if they are not power of two % (this slows down the computation!) if p~=round(p) || any(size (c)~=width) p = ceil(p); width = 2^p; switch dim

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 42 SPRING 2020 Vol 12, no 1 Vol 12, no 1

case 1 mz = zeros(1,width); mz(1:length(c)) = c; c = mz; case 2 mz = zeros(width, width); mz(1:size(c,1), 1:size(c,2)) = c; c = mz; case 3 mz = zeros(width, width, width); mz(1:size(c,1), 1:size(c,2), 1:size(c,3)) = c; c = mz; end end n=zeros(1,p+1); % pre-allocate the number of box of size r switch dim case 1 %------1D boxcount ------% n(p+1) = sum(c); for g=(p-1):-1:0 siz = 2^(p-g); siz2 = round(siz/2); for i=1:siz:(width-siz+1) c(i) = ( c(i) || c(i+siz2)); end n(g+1) = sum(c(1:siz:(width-siz+1))); end

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 43 SPRING 2020 Vol 12, no 1 Vol 12, no 1

case 2 %------2D boxcount ------% n(p+1) = sum(c(:)); for g=(p-1):-1:0 siz = 2^(p-g); siz2 = round(siz/2); for i=1:siz:(width-siz+1) for j=1:siz:(width-siz+1) c(i,j) = ( c(i,j) || c(i+siz2,j) || c(i,j+siz2) || c(i+siz2,j+siz2) ); end end n(g+1) = sum(sum(c(1:siz:(width-siz+1),1:siz:(width-siz+1)))); end case 3 %------3D boxcount ------% n(p+1) = sum(c(:)); for g=(p-1):-1:0 siz = 2^(p-g); siz2 = round(siz/2); for i=1:siz:(width-siz+1), for j=1:siz:(width-siz+1), for k=1:siz:(width-siz+1), c(i,j,k)=( c(i,j,k) || c(i+siz2,j,k) || c(i,j+siz2,k) ... || c(i+siz2,j+siz2,k) || c(i,j,k+siz2) || c(i+siz2,j,k+siz2) ... || c(i,j+siz2,k+siz2) || c(i+siz2,j+siz2,k+siz2)); end end end

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/

MATHEMATICS TEACHING RESEARCH JOURNAL 44 SPRING 2020 Vol 12, no 1 Vol 12, no 1

n(g+1) = sum(sum(sum(c(1:siz:(width-siz+1),1:siz:(width-siz+1),1:siz:(width-siz+1))))); end end n = n(end:-1:1); r = 2.^(0:p); % box size (1, 2, 4, 8...) if any(strncmpi(varargin,'slope',1)) s=-gradient(log(n))./gradient(log(r)); semilogx(r, s, 's-'); ylim([0 dim]); xlabel('r, box size'); ylabel('- d ln n / d ln r, local dimension'); title([num2str (dim) 'D box-count']); elseif nargout==0 || any(strncmpi(varargin,'plot',1)) loglog(r,n,'s-'); xlabel('r, box size'); ylabel('n(r), number of boxes'); title([num2str (dim) 'D box-count']); end if nargout==0 clear r n end

Readers are free to copy, display, and distribute this article as long as the work is attributed to the author(s) and Mathematics Teaching-Research Journal Online, it is distributed for non-commercial purposes only, and no alteration or transformation is made in the work. All other uses must be approved by the author(s) or MTRJ. MTRJ is published by the City University of New York. http://www.hostos.cuny.edu/mtrj/