visualizing fractals using 3d...

1
Visualizing Fractals Using 3D Printing Ted Spiro Divye Bhagwani Harsha Podapati Supervisor: Dr. Olga Lukina University of Illinois at Chicago Mathematical Computing Laboratory Summary The goal of this research project was to create 3D models of var- ious self-similar fractals to better understand their mathematical properties by having a physical model to manipulate and analyze. We did this by researching how the fractals are created, and then creating a program to render a model of the design. After a digital model was created, we exported the rendering to the 3D model- ing software for the printer to convert the model into a 3D printing blueprint. Then we would print the model and hone the settings until we ended up with a perfect print. Equipment & Software I Ultimaker 2 3D Printer with PLA(Polylactic Acid) Filament I Ultimaker Cura (3D Printing Software) I OpenSCAD I Wolfram Mathematica What is a Fractal Fractals are patterns or objects that are self-similar across differ- ent scales. They are created by repeating a process infinitely many times. Since the main objective of this project is 3D printing fractal ob- jects, we printed various well-known fractals, as well as less com- mon types. We also managed to print some 2 dimensional fractal objects by giving them a very small height. How To Create Fractals Fractals are created by recursion. A recursion is a procedure which invokes itself. Substitution: This method is a form of recursion, where part of the object is removed or replaced according to a substitution rule. For example, in the second picture a cube is divided into 27 cubes, then the middle 7 cubes are removed. The same substitution rule is then applied to each of the remaining cubes recursively. Iteration: This method involves fractals constructed by the union of several copies of themselves. Each copy is transformed by a function. The method is also referred to as the Iterated Function System. List of Printed Objects I Sierpinski Triangle and Sierpinski Pyramid (1 st picture) I Menger Carpet and Menger Sponge (2 nd picture) I Fractal Trees (3 rd picture) I Dodecahedron Fractal (4 th picture) I Cube Fractal (5 th picture) I Koch Snowflake Some of What We Made The Math Behind the Prints A mathematical fractal is constructed by repeating a recursive procedure infinitely many times. Such fractals often have frac- tional dimension. Although it is physically impossible to print a fractal constructed by an infinite number of iterations, it is worth exploring the math- ematical concept of fractional dimension. Box Counting Dimension As the name suggests, we can count how many boxes it takes to cover the object in order to calculate its dimension. The di- mension is calculated by zooming in (that is, making the boxes smaller) and re-computing the number of boxes. So, we get the following equation for the box dimension: Box(S)= lim δ 0 inf log(N δ (S)) log( 1 δ ) = lim δ 0 sup log(N δ (S)) log( 1 δ ) where S is the given set or fractal design, δ is the length of the sides of the boxes, and N δ is the number of boxes. In general, the values of liminf and limsup in the formula above may be non-equal. In that case, the box dimension of the fractal is not defined, but we can still talk about the lower box counting dimension, and the upper box counting dimension of S. Now that we have the formula, let’s compute the box counting dimension for the Menger Sponge. Let 1 3 n δ 1 3 n-1 . When we create the Menger Sponge by substitution, we divide a cube into 27 smaller cubes and remove the middle 7 cubes. When we do this, we are left with 20 cubes. Repeating this pro- cedure n times, we have: 20 n-1 N δ (S) 20 n After plugging these into the equation and doing some tedious algebra, we find the following: Box(S)= log 20 log 3 2.72683 This means that the dimension of the fractal is less than 3 but greater than 2 when iterations tend towards infinity! Doing this same process for the Sierpinski Pyramid yields a Box Counting Dimension of 2. This means that, mathematically, the fractal has no volume! Hausdorff Dimension The Hausdorff dimension is very similar to the box counting di- mension. However, there is one key difference: when computing the Hausdorff dimension, we cover the fractal S by boxes with edges of length at most δ . When computing the Box Dimension, we cover S by boxes with edges of length precisely δ . So for some sets, the Hausdorff and the box counting dimensions are not equal. For example, the set K = {0} S {1, 1 2 , 1 3 , ···} has box dimension 1/2 and Hausdorff dimension 0 (Example 1.8 in the book by Bishop and Peres). Challenges One of the biggest challenges we overcame was finding the best software to model these designs. We needed a software that could both do the operations we required as well as generate 3D ren- derings. Our research first started on Wolfram Mathematica. But, due to the limited nature of the Online version, we shifted to us- ing OpenSCAD. This change put us away from using higher level functions, but gave us more customizability to our programs. Another challenge of this project was to make models that didn’t turn out like this... This required us to understand all the mechanics of 3D print- ing. We learned that different filament colors printed differently: darker colors were more oily than lighter colors. Learning what the settings should be for each print and filament was crucial to get the successful prints that we made. Lastly, we learned that many fractals cannot be successfully 3D printed due to physical constraints. The first being that fractals are objects that have processes that have taken place an infinite amount of times. Since we can never reach infinity, we can never have a fully realized fractal. Also, many fractal objects were too complex to render due to computational limitations. Because of this, there were many fractals that we created that were not able to be physically realized. Outcome Even through our challenges, we had a very successful semester, creating numerous fractal objects using our 3D printer. We also learned a lot about creating fractals and about their many interest- ing mathematical properties. Lastly, we would like to thank Dr. Olga Lukina for her guidance and teaching throughout the semester. Without her knowledge and help, this project would not have been a success. References Christopher J. Bishop and Yuval Peres. Fractals in Proba- bility and Analysis. Cambridge Studies in Advanced Mathe- matics. Cambridge University Press, 2016. DOI : 10 . 1017 / 9781316460238. David Mumford, Caroline Series, and David Wright. Indra’s Pearls: The Vision of Felix Klein. Cambridge University Press, 2002. DOI : 10.1017/CBO9781107050051. Wikibooks. OpenSCAD User Manual/The OpenSCAD Lan- guage — Wikibooks, The Free Textbook Project. [Online; accessed 21-November-2018]. 2017. URL : https : / / en . wikibooks . org / w / index . php ? title = OpenSCAD _ User _ Manual/The_OpenSCAD_Language&oldid=3289314. http://mcl.math.uic.edu/

Upload: others

Post on 29-Jun-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Visualizing Fractals Using 3D Printingmcl.math.uic.edu/wp-content/uploads/2018/12/F18-3dprint...Pearls: The Vision of Felix Klein.Cambridge University Press, 2002. DOI: 10.1017/CBO9781107050051

Visualizing Fractals Using 3D PrintingTed Spiro Divye Bhagwani Harsha Podapati Supervisor: Dr. Olga Lukina

University of Illinois at Chicago

MathematicalComputingLaboratory

Summary

The goal of this research project was to create 3D models of var-ious self-similar fractals to better understand their mathematicalproperties by having a physical model to manipulate and analyze.We did this by researching how the fractals are created, and thencreating a program to render a model of the design. After a digitalmodel was created, we exported the rendering to the 3D model-ing software for the printer to convert the model into a 3D printingblueprint. Then we would print the model and hone the settingsuntil we ended up with a perfect print.

Equipment & Software

I Ultimaker 2 3D Printer with PLA(Polylactic Acid) FilamentI Ultimaker Cura (3D Printing Software)I OpenSCADI Wolfram Mathematica

What is a Fractal

Fractals are patterns or objects that are self-similar across differ-ent scales. They are created by repeating a process infinitely manytimes.

Since the main objective of this project is 3D printing fractal ob-jects, we printed various well-known fractals, as well as less com-mon types. We also managed to print some 2 dimensional fractalobjects by giving them a very small height.

How To Create Fractals

Fractals are created by recursion. A recursion is a procedurewhich invokes itself.

Substitution: This method is a form of recursion, where part ofthe object is removed or replaced according to a substitution rule.For example, in the second picture a cube is divided into 27 cubes,then the middle 7 cubes are removed. The same substitution ruleis then applied to each of the remaining cubes recursively.

Iteration: This method involves fractals constructed by the unionof several copies of themselves. Each copy is transformed by afunction. The method is also referred to as the Iterated FunctionSystem.

List of Printed Objects

I Sierpinski Triangle and Sierpinski Pyramid (1st picture)I Menger Carpet and Menger Sponge (2nd picture)I Fractal Trees (3rd picture)I Dodecahedron Fractal (4th picture)I Cube Fractal (5th picture)I Koch Snowflake

Some of What We Made

The Math Behind the Prints

A mathematical fractal is constructed by repeating a recursiveprocedure infinitely many times. Such fractals often have frac-tional dimension.

Although it is physically impossible to print a fractal constructedby an infinite number of iterations, it is worth exploring the math-ematical concept of fractional dimension.

Box Counting Dimension

As the name suggests, we can count how many boxes it takesto cover the object in order to calculate its dimension. The di-mension is calculated by zooming in (that is, making the boxessmaller) and re-computing the number of boxes.

So, we get the following equation for the box dimension:

Box(S) = limδ→0

inflog(Nδ(S))

log(1δ)

= limδ→0

suplog(Nδ(S))

log(1δ)

where S is the given set or fractal design, δ is the length of thesides of the boxes, and Nδ is the number of boxes.

In general, the values of liminf and limsup in the formula abovemay be non-equal. In that case, the box dimension of the fractalis not defined, but we can still talk about the lower box countingdimension, and the upper box counting dimension of S.

Now that we have the formula, let’s compute the box countingdimension for the Menger Sponge. Let

13n ≤ δ ≤ 1

3n−1.

When we create the Menger Sponge by substitution, we divide acube into 27 smaller cubes and remove the middle 7 cubes.

When we do this, we are left with 20 cubes. Repeating this pro-cedure n times, we have:

20n−1 ≤ Nδ(S)≤ 20n

After plugging these into the equation and doing some tediousalgebra, we find the following:

Box(S) =log20log3

≈ 2.72683

This means that the dimension of the fractal is less than 3 butgreater than 2 when iterations tend towards infinity!

Doing this same process for the Sierpinski Pyramid yields a BoxCounting Dimension of 2. This means that, mathematically, thefractal has no volume!

Hausdorff Dimension

The Hausdorff dimension is very similar to the box counting di-mension. However, there is one key difference: when computingthe Hausdorff dimension, we cover the fractal S by boxes withedges of length at most δ . When computing the Box Dimension,we cover S by boxes with edges of length precisely δ . So forsome sets, the Hausdorff and the box counting dimensions are notequal.

For example, the set K = {0}⋃{1, 1

2,13, · · ·} has box dimension

1/2 and Hausdorff dimension 0 (Example 1.8 in the book byBishop and Peres).

Challenges

One of the biggest challenges we overcame was finding the bestsoftware to model these designs. We needed a software that couldboth do the operations we required as well as generate 3D ren-derings. Our research first started on Wolfram Mathematica. But,due to the limited nature of the Online version, we shifted to us-ing OpenSCAD. This change put us away from using higher levelfunctions, but gave us more customizability to our programs.

Another challenge of this project was to make models that didn’tturn out like this...

This required us to understand all the mechanics of 3D print-ing. We learned that different filament colors printed differently:darker colors were more oily than lighter colors. Learning whatthe settings should be for each print and filament was crucial toget the successful prints that we made.

Lastly, we learned that many fractals cannot be successfully 3Dprinted due to physical constraints. The first being that fractalsare objects that have processes that have taken place an infiniteamount of times. Since we can never reach infinity, we can neverhave a fully realized fractal. Also, many fractal objects were toocomplex to render due to computational limitations.

Because of this, there were many fractals that we created thatwere not able to be physically realized.

Outcome

Even through our challenges, we had a very successful semester,creating numerous fractal objects using our 3D printer. We alsolearned a lot about creating fractals and about their many interest-ing mathematical properties.

Lastly, we would like to thank Dr. Olga Lukina for her guidanceand teaching throughout the semester. Without her knowledgeand help, this project would not have been a success.

References

Christopher J. Bishop and Yuval Peres. Fractals in Proba-bility and Analysis. Cambridge Studies in Advanced Mathe-matics. Cambridge University Press, 2016. DOI: 10 . 1017 /

9781316460238.David Mumford, Caroline Series, and David Wright. Indra’sPearls: The Vision of Felix Klein. Cambridge University Press,2002. DOI: 10.1017/CBO9781107050051.Wikibooks. OpenSCAD User Manual/The OpenSCAD Lan-guage — Wikibooks, The Free Textbook Project. [Online;accessed 21-November-2018]. 2017. URL: https : / / en .

wikibooks.org/w/index.php?title=OpenSCAD_User_

Manual/The_OpenSCAD_Language&oldid=3289314.

http://mcl.math.uic.edu/