Implementation [of geometric substitution systems]
The most convenient approach is to represent each pattern by a list of complex numbers, with the center of each square being given in terms of each complex number z by {Re[z], Im[z]}{Re[z], Im[z]}
. The pattern after n steps is then given by Nest[Flatten[f[#]] &, {0}, n]Nest[Flatten[f[#]] &, {0}, n]
, where for the rule on page 189 f[z_] = 1/2 (1 - ) {z + 1/2, z - 1/2}f[z_] = 1/2 (1 - ) {z + 1/2, z - 1/2}
(f[z_] = (1 - ){z + 1, z}f[z_] = (1 - ){z + 1, z}
gives a transformed version). For the rule on page 190, f[z_] = 1/2 (1 - ) { z + 1/2, z - 1/2}f[z_] = 1/2 (1 - ) { z + 1/2, z - 1/2}
. For rules (a), (b) and (c) (Koch curve) on page 191 the forms of f[z_]f[z_]
are respectively:
(0.296 - 0.57 ) z - 0.067 - {1.04, 0.237}(0.296 - 0.57 ) z - 0.067 - {1.04, 0.237}
N[1/40 {17 (√3 - ) z, -24 + 14 z}]N[1/40{17\!\(\*SqrtBox[\(3\)]\)-\[ImaginaryI])z,-24+14z}]
N[(1/2 (1/√3 - 1)( + {1, -1}) - - (1 + {, -}/√3) z)/2]N[(1/2(1/\!\(\*SqrtBox[\(3\)]\)-1)(\[ImaginaryI]+{1,-1})-\[ImaginaryI]-(1+{\[ImaginaryI],-\[ImaginaryI]}/\!\(\*SqrtBox[\(3\)]\))z)/2]