<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://www.jayeshdhadphale.com/feed.xml" rel="self" type="application/atom+xml"/><link href="https://www.jayeshdhadphale.com/" rel="alternate" type="text/html" hreflang="en"/><updated>2026-02-02T10:17:27+00:00</updated><id>https://www.jayeshdhadphale.com/feed.xml</id><title type="html">blank</title><subtitle>Personal website of Jayesh M. Dhadphale. I work on data-driven modeling, nonlinear dynamics, thermoacoustics, combustion. </subtitle><entry><title type="html">Fractals</title><link href="https://www.jayeshdhadphale.com/blog/2025/fractals/" rel="alternate" type="text/html" title="Fractals"/><published>2025-11-10T10:00:00+00:00</published><updated>2025-11-10T10:00:00+00:00</updated><id>https://www.jayeshdhadphale.com/blog/2025/fractals</id><content type="html" xml:base="https://www.jayeshdhadphale.com/blog/2025/fractals/"><![CDATA[<p>Fractals are objects with fractional dimensions. Sounds weird, what is the meaning of a fractional dimension?</p> <p>Let’s make some interesting patterns before diving into mathematical details.</p> <h1 id="koch-curve">Koch curve</h1> <p>The Koch curve or snowflake is a fractal and its name is associated with a mathematician <a href="https://en.wikipedia.org/wiki/Helge_von_Koch">Helge von Koch</a>. The fractal can be made iteratively by starting with a triangle (or only one side of the triangle). Then divide the side into three equal parts and replace the segment at the center with two segments of the same length that add a minor triangular feature. Repeating these steps yields a beautiful Koch curve.</p> <p>Read more about Koch snowflake on <a href="https://en.wikipedia.org/wiki/Koch_snowflake">Wikipedia</a>.</p> <style>.iframe-container{display:flex;justify-content:center;align-items:center}iframe{border-radius:20px;border:0}</style> <div class="iframe-container"> <iframe src="/assets/html/koch2D.html" class="transparent-frame" allowtransparency="true" width="90%" height="600px"> </iframe> </div> <div class="caption"> Koch snowflake. Use the slider to understand how to make one. </div> <h1 id="dragon-curve">Dragon curve</h1> <p>Similar to the Koch curve, we can use a recursive process to create another <a href="https://en.wikipedia.org/wiki/File:Dragon_Curve_unfolding_zoom_numbered.gif">Dragon curve </a>. To make a Dragon curve, we start with a horizontal line segment. This line segment is folded at the center to make a right angle. Folding basically scales and rotates the first half of the segment clockwise. In the following interactive figure, clockwise folding is depicted in red, and counterclockwise folding is shown in green. You can see there is an alternate pattern of clockwise and counterclockwise rotation.</p> <div class="iframe-container"> <iframe src="/assets/html/dragon2D.html" class="transparent-frame" allowtransparency="true" width="90%" height="600px"> </iframe> </div> <div class="caption"> Dragon curve. The clockwise folding is shown in red, and the counter-clockwise folding is shown in green. Use the slider to understand the algorithm. The black curve represents the final curve at the end of each iteration, while the red and green curves show the intermediate steps used to create the final curve from the previous iteration. </div> <p>Read more about Dragon curve on <a href="https://en.wikipedia.org/wiki/Dragon_curve">Wikipedia</a>.</p> <h1 id="koch-curve-3d">Koch curve 3D</h1> <p>Here, we will explore the generalization of the Koch curve to three dimensions. We start with a six-sided <strong>delta</strong> shape, which has six faces. The delta has nine sides, with three sides of length three units and the remaining six sides of length two units. You can interact with the figures to see how the initial geometry is used to perform on iteration.</p> <div class="iframe-container"> <iframe src="/assets/html/koch_3d_pyvista_0_.html" class="transparent-frame" allowtransparency="true" width="90%" height="600px"> </iframe> </div> <div class="caption"> Koch 3D's Initial geometry. 🥽🧪🔬 You can interact with this figure. </div> <div class="iframe-container"> <iframe src="/assets/html/koch_3d_pyvista_1_.html" class="transparent-frame" allowtransparency="true" width="90%" height="600px"> </iframe> </div> <div class="caption"> Koch 3D's geometry after one iteration. There are three copies of the initial geometry sharing the longer edge. 🥽🧪🔬 You can interact with this figure. </div> <p>This process is repeated seven times to create a 3D Koch, which appears complex yet beautiful.</p> <div class="iframe-container"> <iframe src="/assets/html/koch_3d_pyvista_7_.html" class="transparent-frame" allowtransparency="true" width="90%" height="600px"> </iframe> </div> <div class="caption"> Koch 3D's geometry after seven iterations. 🥽🧪🔬 You can interact with this figure. </div> <p>Read more about Koch fractal 3D on <a href="https://www.researchgate.net/publication/262600735_The_Koch_curve_in_three_dimensions">ResearchGate</a>.</p> <p>Now, let’s understand how we can define dimension.</p> <h1 id="dimension">Dimension</h1> <p>Based on our understanding, the point is zero-dimensional and is indivisible. A line segment is one-dimensional, an area is two-dimensional, and a volume is three-dimensional. Let us now conduct an experiment and determine how dimension is related to geometry.</p> <p>Let us consider a line segment of length $L$. Now, if we shrink a length $L$ by a factor $f$, we get a length of $l=L/f$. Number of copies ($N$) of $l$ required to make $L$ are,</p> \[N = L/l = f\] <div class="row"> <div class="col-sm-12 mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/fractals/line.svg" sizes="95vw"/> <img src="/assets/img/posts/fractals/line.svg" class="img-fluid rounded z-depth-1" width="100%" height="auto" title="Schematic" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> </div> <div class="caption"> Scaling a line segment by a factor $f=4$ needs $N=4$ copies of the shrunk object to reconstruct the original line segment. </div> <p>Let us consider an example, if we have $L=1$ and we shrink it by factor $f=4$ then the shrinked line segment is of $l=L/f=0.25$. The number of copies of length $l=0.25$ needed to make lenght $L=1$ are, $N = L/l = 1/0.25=4 = f$.</p> <p>Though this calculations are trivial our objective is to see how shrinking the original object by factor $f$ is related to number of copies we need to fill or construct original object. This will help us defining the dimension.</p> \[N = f\] <p>Now consider a square of side $L$. The property that we are interesed here is area,</p> \[A = L^2\] <p>we can notice that to compute area we squared the length. That is power of length is 2. Is this related to dimension of the area? Lets dig more deeper.</p> <div class="row"> <div class="col-sm-12 mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/fractals/square.svg" sizes="95vw"/> <img src="/assets/img/posts/fractals/square.svg" class="img-fluid rounded z-depth-1" width="100%" height="auto" title="Schematic" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> </div> <div class="caption"> Scaling a square by a factor $f=4$ requires $N=16$ copies to fill the initial area. </div> <p>Now, if we shrink the area by a factor $f$ in each direction, we can see that each side becomes of length $l=L/f$. New area,</p> \[a = (L/f)^2\] <p>Thus, to fill the original area we need,</p> \[N = A/a = f^2.\] <p>Thus, for the two-dimensional area we get, \(N = f^2\)</p> <p>That is, if we scale the object by a factor $f$ in each direction, we need $f^2$ copies to reconstruct the complete object. Thus, we can generalize the concept of dimension and write. \(N = f^D\)</p> <p>Hence, we can obtain the dimension of the object by,</p> \[D = \frac{\ln N}{\ln f} .\] <p>We will use this exact definition to find the dimension of the Koch curve.</p> <p>For the curve, we will use the simple one-sided Koch curve.</p> <div class="iframe-container"> <iframe src="/assets/html/koch2D_line.html" class="transparent-frame" allowtransparency="true" width="90%" height="600px"> </iframe> </div> <div class="caption"> Koch snowflake's one side. Use the slider to understand how to make one. </div> <p>Initial line segment length is $L_0=1$ unit. After which the line segment is shrunk to (1/3) units and replicated four times. The length of the Koch curve is now $L_1 = (1/3)4$.</p> <p>Okay, but as per our discussion, we should recreate the whole object, whereas we are doing something different here. The key point to consider is that we should shrink the full fractal, where the shrunken object is a replica of the original. Here, if we shrink the Koch curve by a factor of three, we need four such Koch curves to form the original ones. You can see that we found the relation between the number of copies needed and the scaling factor. Thus,</p> \[D = \frac{\ln N}{\ln f} = \frac{\ln 4}{\ln 3} = 1.26\] <p>Dimension $D$ is a fractional number. What does it mean?</p> <p>We can ask a few questions. What is the length of the Koch Curve?</p> <p>The line segment shrinks by three after each iteration, and there are $4^n$ segments at the end of $n$ iterations.</p> <p>Thus, the total length is, \(L_n = 4^n \big(\frac{1}{3}\big)^n = \big(\frac{4}{3}\big)^n\)</p> <p>Here the factor $(4/3)&gt;1$ which means as $n\to\infty$ $L_{\infty}\to\infty$. That is, the Koch curve has infinite length in a finite region. On the other hand, it does not occupy the entire area. These statements indicate that it is more than a line but less than an area, and thus it occupies the dimension between a line and an area.</p> <p>We can determine the fractal dimension using alternative methods, such as the <a href="https://en.wikipedia.org/wiki/Box_counting">box counting method</a>. If interested, you can explore more on <a href="https://en.wikipedia.org/wiki/Fractal">fractals</a>.</p> <p>You can find the code used for creating fractals on <a href="https://github.com/JayeshMD/Fractals.git">GitHub@JayeshMD</a>.</p>]]></content><author><name></name></author><category term="Geometry"/><category term="code"/><category term="images"/><category term="math"/><summary type="html"><![CDATA[A recursive pattern]]></summary></entry></feed>