I am trying to perform the task in Mark McClure's article Parametric L-Systems and borderline fractals. I have copied his opening code on the first three pages:
axiom = {F[1], r[-2 π/3], F[1], r[-2 π/3], F[1]};
KochRule = F[x_] :> {F[x/3], r[π/3], F[x/3], r[-2 π/3], F[x/3], r[π/3], F[x/3]};
instructions = Flatten[Nest[# /. KochRule &, axiom, 5]];
lines = {};
lastpt = {0, 0};
dir = {1, 0};
rotate[θ_] := N[{ {Cos[θ], -Sin[θ]}, {Sin[θ], Cos[θ]}}];
turtleInterpretation = {
F[x_] :> (lines = {Line[{lastpt, lastpt += x dir}], lines}),
r[t_] :> (dir = rotate[t].dir;)};
instructions /. turtleInterpretation;
Show[Graphics[lines],
AspectRatio -> Automatic]
I am using Mathematica 11.1.1 on a MacBook Pro with Sierra OS X. When I evaluated the cell, I got a beep and the following image.
I went to the Help menu and selected "Why the Beep" and got the message
A box structure with a depth exceeding the maximum allowed depth was encountered.
Any suggestions?
Update: I thought I'd share another technique I discovered by examining this page:
str = First@SubstitutionSystem[{"F" -> "F-F++F-F"}, "F++F++F", {6}];
Graphics[Line[
AnglePath[
StringCases[
str, {"F" -> {1, 0}, "+" -> {0, Pi/3}, "-" -> {0, -Pi/3}}]]]]
Gave this image:


