Length of a fractal
Author: Daniel Mentrard
Date: 10 Décembre 2014

FRACTAL

If a is the distance between A and B, what is the length of this tortuous curve?

See formula and result

Easy formula to find when n = 1
 there are 4 equal segments on length
 equal to 3 segments

A = (-3, -6)
B = Point(Ray[A, A + (1, 0)])
A1: {A, B}
A2 = Flatten(Sequence[{Element[A1, i], Dilate[Element[A1, i + 1], 0.3333333333333333, Element[A1, i]], Rotate[Dilate[Element[A1, i + 1], 0.6666666666666666, Element[A1, i]], 1.0471975511965976, Dilate[Element[A1, i + 1], 0.3333333333333333, Element[A1, i]]], Dilate[Element[A1, i + 1], 0.6666666666666666, Element[A1, i]], Element[A1, i + 1]}, i, 1, Length[A1] - 1])
A3 = Flatten(Sequence[{Element[A2, i], Dilate[Element[A2, i + 1], 0.33, Element[A2, i]], Rotate[Dilate[Element[A2, i + 1], 0.67, Element[A2, i]], 1.05, Dilate[Element[A2, i + 1], 0.33, Element[A2, i]]], Dilate[Element[A2, i + 1], 0.67, Element[A2, i]], Element[A2, i + 1]}, i, 1, Length[A2] - 1])
A4 = Flatten(Sequence[{Element[A3, i], Dilate[Element[A3, i + 1], 0.33, Element[A3, i]], Rotate[Dilate[Element[A3, i + 1], 0.67, Element[A3, i]], 1.05, Dilate[Element[A3, i + 1], 0.33, Element[A3, i]]], Dilate[Element[A3, i + 1], 0.67, Element[A3, i]], Element[A3, i + 1]}, i, 1, Length[A3] - 1])
A5 = Flatten(Sequence[{Element[A4, i], Dilate[Element[A4, i + 1], 0.33, Element[A4, i]], Rotate[Dilate[Element[A4, i + 1], 0.67, Element[A4, i]], 1.05, Dilate[Element[A4, i + 1], 0.33, Element[A4, i]]], Dilate[Element[A4, i + 1], 0.67, Element[A4, i]], Element[A4, i + 1]}, i, 1, Length[A4] - 1])
n = 4 (slider from 0 to 6, step 1)
A6 = Flatten(Sequence[{Element[A5, i], Dilate[Element[A5, i + 1], 0.33, Element[A5, i]], Rotate[Dilate[Element[A5, i + 1], 0.67, Element[A5, i]], 1.05, Dilate[Element[A5, i + 1], 0.33, Element[A5, i]]], Dilate[Element[A5, i + 1], 0.67, Element[A5, i]], Element[A5, i + 1]}, i, 1, Length[A5] - 1])
b = PolyLine(Cell[1, n + 1])
A7 = Flatten(Sequence[{Element[A6, i], Dilate[Element[A6, i + 1], 0.33, Element[A6, i]], Rotate[Dilate[Element[A6, i + 1], 0.670000000000001, Element[A6, i]], 1.05, Dilate[Element[A6, i + 1], 0.33, Element[A6, i]]], Dilate[Element[A6, i + 1], 0.670000000000001, Element[A6, i]], Element[A6, i + 1]}, i, 1, Length[A6] - 1])
a = Distance(A, B)
text3: "$Currently \;  length=a×\left( \frac{4}{3}  \right)^{" + (LaTeX[n]) + "} $"
C: A - (0, 1)
D: B - (0, 1)
E = Midpoint(C, D)
u = Vector(E, D)
v = Vector(E, C)
texte1: "a = " + a + ""
rep: a * (4 / 3)^(n)
c = false
texte2: "=" + (LaTeX[rep]) + ""