The main result in this notebook is calculating the area of Koch's snowflake

The Koch's snowflake is a figure that is constructed in the following way: first we have a regular triange with sides of length 1 (this is step 0);  then, on each step we break every side of the figure into three equal segments, on every middle segment we build a regular triangle (facing outwards from our figure) and finally we throw the middle segments away.

What will we get in the limit? The calculation of the length of the snowflake is well known: on each side of the figure we have three equal segments, we throw one out and add two segments having the same length, so on each step the perimeter is increased by (4/3) times, and the general formula is (Subscript[P, n]) = 3 ((((4/3)))^n). But what about the area surrounded by our line? This is a bit more complicated.

First we will define functions to visualize this fractal line.

\(split[pts_] := 
      Module[
		{midpts, sides}, 
		
        midpts[{p1_, p2_}] := 
          Module[
				{vec = p2 - p1}, 

            				{p1, 
					p1 + vec/3, 
					
              p1 + vec/2 + {\(-vec[\([2]\)]\), vec[\([1]\)]} Sqrt[3]/6, 

              					p1 + 2  vec/3}]; 
		
        sides = Transpose[
				{pts, RotateLeft[pts]}]; 
		
        Flatten[
			midpts\ /@\ sides, 1]\ ]\)

\(koch[n_, opt_:  Null] := 
      Module[
		{triang}, 
		
        triang = 
          Table[
				{Sin[2  Pi\ k/3], Cos[2  Pi\ k/3]}, 

              				{k, 0, 2}]/
					Sqrt[3]; 
		
        If[opt == N, 
			triang = N[triang]]; 
		
        Nest[split, triang, n]\ ]\)

\(grph[pts_, opts___] := 
	
      Graphics[
		{opts, 
			Line[Append[pts, pts[\([1]\)]]\ ]}, 
		
        AspectRatio -> Automatic]\)

Here is the line we get on step 3. (Evaluate the next cell to see the graphic.)

Show[grph[koch[3, N]]]

And then we define function for calculating the area of any polygon by its apexes (to check our result later):

\(area[pts_] := 
	
      Abs[Plus\ @@
			
            MapThread[Dot, 

              				{pts, 
                \({\(-#[\([2]\)]\), #[\([1]\)]}&\)\ /@
						
                  RotateLeft[pts]}\ ]\ ]/2\)

The idea is to calculate the difference between areas on two consecutive steps. Here is the picture showing two stages of the snowflake. (Evaluate the next cell to see the graphic.)

\(Show[
	{grph[koch[3, N], Hue[0]], 
		grph[koch[2, N]]\ }]\)

So, on n-th step we have 3×(4^n) sides, each with length (3^(-n)) (so the side of all new triangles appearing on n-th step will be (3^(-n - 1))). Hence, when we go to the (n+1)-th step, we will have 3×(4^n) new triangles, each with area ((((((3^(-n - 1))))^2) (Sqrt[3]))/4), and that's the recurrence equation we need.

Load the standard package DiscreteMath`RSolve`:

<< DiscreteMath`RSolve`

Now use RSolve to solve the recurrence relation:

RSolve[{
        s[n + 1] == 
          s[n] + (4^n) 3 (((3^(-2 (n + 1))) (Sqrt[3]))/4), 
        s[0] == ((Sqrt[3])/4)}, s[n], n]

Use this result to define kocharea:

kocharea[n_] = ((Sqrt[3])/10) (4 - ((((2/3)))^(2  n - 1)));

We've simplified the expression the Mathematica returned a bit, but we can check that they're equal:

\(Simplify[
	kocharea[n] - s[n] /. %%[\([1]\)]\ ]\)

Now that we have the function calculating areas of polygons we can do a check:

Array[kocharea, 4, 0]

Array[area[koch[#]]&, 4, 0] // Simplify

So we see that although the perimeter of the Koch's snowflake tends to infinity, the surrounded area is always less than (8/5) of the area of the initial triangle:

Limit[kocharea[n], n -> ∞]/kocharea[0]

Finally, in the same way we can research the properties of the line we would get if we made newly-built triangles face inwards.

Copyright © 1998, Maxim Rytin