reset
st
to tile0 :s
pu
fw :s
pd
repeat 2 [
pd
rt 90
arc :s/3 90
pu
fw :s
]
bw :s/3
rt 90
pd
fw :s
lt 90
pu
fw :s/3
lt 90
fw :s/2
lt 180
pd
arc :s/6 180
pu
bw :s/2
rt 90
pd
end
to tile1 :s
lt 90
repeat 2 [
pd
rt 90
arc :s/3 90
pu
fw :s
]
bw :s/3
rt 90
pd
fw :s
lt 90
pu
fw :s/3
lt 90
fw :s/2
lt 180
pd
arc :s/6 180
pu
bw :s/2
rt 180
bw :s
pd
end
to tile2 :s
pu
fw :s
rt 90
fw :s
lt 90
pd
rt 90
repeat 2 [
pd
rt 90
arc :s/3 90
pu
fw :s
]
bw :s/3
rt 90
pd
fw :s
lt 90
pu
fw :s/3
lt 90
fw :s/2
lt 180
pd
arc :s/6 180
pu
bw :s/2
rt 90
fw :s
lt 90
pd
end
to tile3 :s
pu
fw :s
rt 90
fw :s/2
lt 90
pd
rt 90
arc :s/6 180
pu
fw :s/2
rt 90
pu
fw :s/2
pd
arc :s/6 180
pu
fw :s/2
rt 90
fw :s
rt 90
pd
arc :s/3 90
arc 2*:s/3 90
lt 180
pu
bw :s
lt 90
fw :s
rt 90
fw :s
rt 180
pd
end
to tile4 :s
rt 90
pu
fw :s/3
pd
lt 90
fw :s
pu
rt 90
fw :s/3
rt 90
pd
fw :s
pu
lt 90
fw :s/3
lt 90
fw :s/3
lt 90
pd
fw :s
rt 90
pu
fw :s/3
rt 90
pd
fw :s
rt 90
pu
fw 2*:s/3
pd
rt 180
end
to tile5 :s
pu
rt 90
fw :s/2
lt 90
pd
lt 90
arc :s/6 180
pu
fw :s/2
rt 90
pu
fw :s/2
pd
arc :s/6 180
pu
fw :s/2
rt 90
fw :s
rt 90
pd
arc :s/3 90
arc 2*:s/3 90
lt 180
pu
bw :s
pd
end
to tile6 :s
pu
lt 90
bw :s
pd
arc :s/3 90
arc 2*:s/3 90
pu
fw :s
rt 90
fw :s
rt 90
pd
arc :s/3 90
arc 2*:s/3 90
pu
fw :s
rt 90
fw :s
lt 180
pd
end
to tile7 :s
pu
rt 90 fw :s
lt 180
fw :s/2
pd
arc :s/6 180
pu
bw :s/2
lt 90
bw :s/3
rt 90
pd
fw :s
pu
rt 90
fw :s/3
rt 90
pd
fw :s
lt 90
pu
fw :s/3
lt 90
fw :s/2
rt 180
pd
arc :s/6 180
pu
fw :s/2 lt 90 bw :s
pd
end
to tile8 :s
pu
rt 90
fw :s/2
lt 180
pd
arc :s/6 180
rt 180
pu
fw :s/2
lt 90
fw :s
rt 180
pd
arc 2*:s/3 90
pu
rt 90
fw :s
rt 180
pd
arc 2*:s/3 90
lt 90
pu
bw :s/3
rt 90
pd
fw :s
lt 90
pu
bw 2*:s/3
rt 90
pd
lt 90
end
to tile7 :s
pu
fw :s/2
pd
arc :s/6 180
pu
bw :s/2
lt 90
bw :s/3
rt 90
pd
fw :s
pu
rt 90
fw :s/3
rt 90
pd
fw :s
lt 90
pu
fw :s/3 lt 90
fw :s/2 rt 180
pd
arc :s/6 180
pu
bw :s/2
fw :s
lt 180
pd
end
to tile9 :s
pu
rt 90
fw :s
rt 90
bw :s/2
pd
arc :s/6 180
pu
fw :s/2
rt 90
pu
fw :s/2
pd
arc :s/6 180
pu
fw :s/2
rt 90
fw :s
rt 90
pd
arc :s/3 90
arc 2*:s/3 90
lt 180
pu
bw :s
rt 90
bw :s
pd
end
to tile10 :s
pu
lt 180
bw :s
rt 90
bw :s/2
lt 90
pd
rt 270
arc :s/6 180
pu
fw :s/2
rt 90
pu
fw :s/2
pd
arc :s/6 180
pu
fw :s/2
rt 90
fw :s
rt 90
pd
arc :s/3 90
arc 2*:s/3 90
lt 180
pu
bw :s
rt 90
bw :s
rt 90 bw :s pd
end
to tile11 :s
pu
rt 90
fw :s/2
lt 180
pd
arc :s/6 180
rt 180
pu
fw :s/2
lt 90
fw :s
rt 180
pd
arc 2*:s/3 90
pu
rt 90
fw :s
rt 180
pd
arc 2*:s/3 90
lt 90
pu
bw :s/3
rt 90
pd
fw :s
lt 90
pu
bw 2*:s/3
rt 90
pd
lt 90
end
to tile12 :s
pu
rt 90 fw :s rt 90 bw :s
rt 90
fw :s/2
lt 180
pd
arc :s/6 180
rt 180
pu
fw :s/2
lt 90
fw :s
rt 180
pd
arc 2*:s/3 90
pu
rt 90
fw :s
rt 180
pd
arc 2*:s/3 90
lt 90
pu
bw :s/3
rt 90
pd
fw :s
lt 90
pu
bw 2*:s/3
rt 90
lt 90
fw :s lt 90 fw :s lt 90
pd
end
to tile :n
setxy 0 500
repeat:n[
repeat :n[
make "r rand 13
if :r = 0
[tile0 500/:n]
if :r = 1
[tile1 500/:n]
if :r = 2
[tile2 500/:n]
if :r = 3
[tile3 500/:n]
if :r = 4
[tile4 500/:n]
if :r = 5
[tile5 500/:n]
if :r = 6
[tile6 500/:n]
if :r = 7
[tile7 500/:n]
if :r = 8
[tile8 500/:n]
if :r = 9
[tile9 500/:n]
if :r = 10
[tile10 500/:n]
if :r = 11
[tile11 500/:n]
if :r = 12
[tile12 500/:n]
]
pu
fw 500/:n
lt 90
fw 500
rt 90
pd
]
end
tile 20