During our week 2 class, we worked on creating a carpet fractal in OpenSCAD, which I named "Bombers" (based on the resemblance to a stealth bomber) I created this by modifying some set code in OpenSCAD. The original design was a 100mm square with minimal depth, missing 1/16 of its area. My assignment was to subtract additional area and repeat the design multiple times.
 |
| Original shape, code featured on the left with directions. |
Dr. Schreck and I worked on computing the area of the shape, trying to determine the area of the fractal at its first, second and third iterations.
I then recreated the shape in OpenSCAD by adding two "/" marks before the location in the code, indicating to the program to subtract that area. My resulting n=1 looked like the following.
 |
| n=1 |
 |
| n=2 |
 |
| n=3 |
 |
| n=4 |
 |
| n=4 detail |
In class, we continued to work on the math involved in the fractal, and produced the following calculation of the geometric series needed to continue subtracting spaces from the object.
Fractional Dimension... Discovering shapes with dimensions that aren't strictly 1, 2 or 3.
In order to understand fractional dimensions, we began by looking at several basic shapes, namely cubes, squares and lines. If I have a line, a square and a cube, and I double their size, I get a line (1=11) that is twice as long (2=11), a square (1=12) that is twice as large (4=22), a cube (1=13) that is twice as large (8=23)... I can see that the area/volume of the object is the first number and the second number is the scale factor. In this case, 2. The third number (the exponent) is the dimension. (Squares are 2-dimensional, cubes are 3...)
In the case of fractals, normally a self-similar part of the object is subtracted (or added) and to find the area of the object, or the area that's being subtracted, we use the formula S
D= 1/N.
Scale factor to the power of Dimension is equal to 1 over N (number of copies).
In the case of my Bomber fractal, 3 of the 16 possible squares are missing from my initial stage, and then 3 additional squares disappear from each of the remaining 13 squares each time the fractal is repeated.
Using logarithms to calculate the dimension, we begin with (1/4)
D= 1/13.
We bring the D down in front and solve D log (1/4)
= log (1/13).
Dividing both sides by log (1/4), we end up with D on the left side, and using a calculator to divide log (1/13) by log (1/4), we get 1.8502.
Comments
Post a Comment