MATHEMATICS TEACHING RESEARCH JOURNAL 17 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
Fractals, Self-Similarity, and Beyond Rohitha Goonatilake, Ray A. Casas
Department of Mathematics and Physics, Texas A&M International University,
5201 University Boulevard, Laredo, Texas 78041-1900
Abstract: Since Mandelbrot coined the term fractals in 1975, fractals and their fractal dimension
have become a sensational topic in mathematics, especially with their creative applications to
various fields of science (Mandelbrot, 1975). The study of fractal geometry and chaos theory 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
fractals that are formed from the sets of repelling periodic points of the mapping 𝑔𝑐(𝑧) = 𝑧2 +
𝑐, where 𝑐 is a fixed complex-valued parameter. This article considers several properties of the
Julia sets and fractal dimension 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 dimensions. 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 set. The Julia sets were discovered and studied by the
French mathematicians Gaston Julia and Pierre Fatou 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
MATHEMATICS TEACHING RESEARCH JOURNAL 18 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
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 area. For example, Shishikura (1998) found that Julia sets with
complex constants located on the boundary of the Mandelbrot set 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 Julia set 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 curve is an example, named after the
Swedish mathematician, Helge Von Koch, 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 pattern 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 Hilbert curve, Stairs, Koch anti-snowflake curve, Peano curve, Peano-Gasper curve, Bush One,
Bush Two, Bush Three, Dragon curve, 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 Menger sponge (Pickover, 1998). Fractals are not simply abstract
MATHEMATICS TEACHING RESEARCH JOURNAL 19 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
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 fractal curve 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
MATHEMATICS TEACHING RESEARCH JOURNAL 20 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
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 patterns
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
MATHEMATICS TEACHING RESEARCH JOURNAL 21 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
(Bulaevsky, as of 2020). Furthermore, we will be able to count the number of +’s in each stage to
see how quickly its complexity grows.
Figure 4. Plusses Fractals
Proposition 1. The total number of +'s in each iteration, ,3,2,1=n is given by the formula
.132}13{21 11 −=−+ −− nn
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
.2)2/1()2/1()2/1()2/1(1 32 =++++++ n This results in the area of the rhombus is
units. square8222 =
Proposition 3. The Koch snowflake has an infinite perimeter.
Proof. In every stage of the successive construction, the perimeter of the previous shape is
increased by a factor, 3/4 of the original shape. Since ,1|3/4| the perimeter of the given Koch
snowflake increases indefinitely and has an infinite perimeter.
MATHEMATICS TEACHING RESEARCH JOURNAL 22 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
Proposition 4. The number of outward-pointed vertices in every stage of iteration of a Koch
snowflake is given by the formula ,42 1−+ n where .,3,2,1 =n
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 a 2)3/(1 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 areas,
.5/33)3/2(4
33433/3
1
212
1
=
−
=
==n
nnn
n
This results in the total area of the limiting figure
to be of .5/3835/33 =+
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 2/33 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 .2/)2/33( +
MATHEMATICS TEACHING RESEARCH JOURNAL 23 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
Proposition 7. Every stage of the successive construction of a Koch snowflake, an additional area
amounts to 2/3 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 1=n be 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.
1131211
2-n2-32-2
4/34/34/34/3gleeach trian of Area
3330removed trianglesof No.
n321
−−−− n
n
Now, sum of areas of removed triangles equal to
.3
)4/31/(14/3
)4/3(4/3
)4/1(334/33
0
2
121
2
2
=
−=
=
=
=
=
−−−
=
−
n
n
n
nnn
n
n
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. and ,1for 0 and2for133 32 =+++ −− nnnn
2. 13 −n, 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 space 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.
MATHEMATICS TEACHING RESEARCH JOURNAL 24 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
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 n sides ( −n gons) meeting at a vertex is ,),,,(
timesm
nnn where n is repeated m
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
MATHEMATICS TEACHING RESEARCH JOURNAL 25 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
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 point 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.
MATHEMATICS TEACHING RESEARCH JOURNAL 26 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
36834figure dual theofPerimeter
33246figure vertex theofPerimeter
1286gon-n theofPerimeter
3181636at vertex polygons of areas of Sum
33432figure dual theof Area
4/3322/33figurevertextheofArea
3643gonntheofArea
gons6gons4gons3gonsn
−
−−−−
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 dualArea 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; .2/1/1/1 =+ mn
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,
the points on the complex plane are put into the series 𝑧𝑛+1 = 𝑧𝑛2 + 𝑐, where 𝑧0 is the point ),0,0(
and 𝑐 is the point.
MATHEMATICS TEACHING RESEARCH JOURNAL 27 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
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
Mandelbrot set, we consider 𝑔𝑐(𝑧) = 𝑧2 + 𝑐, say, ).(zf Let |𝑐| = 2 + 𝑑 with .0d 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)1( + d we have )(|||)(| zfzzf 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(𝑥0) = 𝑓(𝑥0), the second iteration is defined as 𝑥2 = 𝑓2(𝑥0) = 𝑓(𝑓(𝑥0)), and, generally, the
𝑛th iteration is defined as 𝑥𝑛 = 𝑓𝑛(𝑥0) = 𝑓(𝑓𝑛(𝑥0)). The sequence of iterations of 𝑥0,
{𝑥0, 𝑓(𝑥0), 𝑓2(𝑥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
values 𝑧0, 𝑓1(𝑧0), 𝑓2(𝑧0), …, 𝑓𝑛−1(𝑧0) are all distinct. The collection of all distinct iterations of
periodic points {𝑧0, 𝑓1(𝑧0), 𝑓2(𝑧0), …, 𝑓𝑛−1(𝑧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).
MATHEMATICS TEACHING RESEARCH JOURNAL 28 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
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
us consider a special case from the family of complex quadratic functions: 𝑔𝑐(𝑧) = 𝑧2 + 𝑐 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.
MATHEMATICS TEACHING RESEARCH JOURNAL 29 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
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
MATHEMATICS TEACHING RESEARCH JOURNAL 30 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
For curves, 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
dimension (or fractal dimension) of 𝑆 is given by dimc 𝑆 = lim𝜖→0
ln 𝑁(𝜖)
ln (1/𝜖) if the limit exists (Gulick,
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
𝜖)𝑆 where (
1
𝜀) 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.
MATHEMATICS TEACHING RESEARCH JOURNAL 31 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
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 linear regression 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
MATHEMATICS TEACHING RESEARCH JOURNAL 32 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
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
Dimension Graph of 𝐽𝑐
c = 0
N/A
(Since the Julia set at c = 0 is
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
MATHEMATICS TEACHING RESEARCH JOURNAL 33 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
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 Euclidean space 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
MATHEMATICS TEACHING RESEARCH JOURNAL 34 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
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
MATHEMATICS TEACHING RESEARCH JOURNAL 35 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
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 spaces, 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.
MATHEMATICS TEACHING RESEARCH JOURNAL 36 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
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.
MATHEMATICS TEACHING RESEARCH JOURNAL 37 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
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 Hausdorff Dimension 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 infinity.
%
% 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:
MATHEMATICS TEACHING RESEARCH JOURNAL 38 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
%
% 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).
MATHEMATICS TEACHING RESEARCH JOURNAL 39 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
% [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.
MATHEMATICS TEACHING RESEARCH JOURNAL 40 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
%
% 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
MATHEMATICS TEACHING RESEARCH JOURNAL 41 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
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
MATHEMATICS TEACHING RESEARCH JOURNAL 42 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
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
MATHEMATICS TEACHING RESEARCH JOURNAL 43 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
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
MATHEMATICS TEACHING RESEARCH JOURNAL 44 SPRING 2020 Vol 12, no 1 Vol 12, no 1
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/
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