Input := Clear[level] level[0]=ListPlot[{ {0,0},{1,0}}, PlotJoined->True, PlotStyle->{Red,Thickness[.01]}, DisplayFunction->Identity ] level[1]=ListPlot[{ {0,0},{0,1/6},{1/6,1/6},{1/6,1/3},{1/3,1/3}, {1/2,1/3},{1/2,1/6},{1/3,1/6},{1/3,0},{1/2,0}, {2/3,0},{2/3,-1/6},{1/2,-1/6},{1/2,-1/3},{2/3,-1/3}, {5/6,-1/3},{5/6,-1/6},{1,-1/6},{1,0}}, PlotJoined->True, PlotStyle->{Red,Thickness[.01]}, DisplayFunction->Identity ] Show[GraphicsArray[{{level[0],level[1]}}, DisplayFunction->$DisplayFunction]]
Output = -Graphics-
Output = -Graphics-
Output = -GraphicsArray-
Answer:
N=18, r=1/6, so
Input := dimension[18,1/6]
Output = 1.61315
Notice that the fractal generated in b) is more jagged than the one generated in a) and has a correspondingly higher fractal dimension.