Ayliean Fractal
Thanks to Christian Mercat News Feed.
Inspired by Something nerdy, @ayliean.
See also This fractal with Basic shapes
Setup
s = sqrt(2)-1
t = sqrt(2)
p = sqrt(2)+1
# Affine transformation matrices
#------------------------------------
W1= {{ 0, s, 0}, {-s, 0, 0}, {0,0,1}}
W2= {{ s, 0, t}, { 0, s,-t}, {0,0,1}}
W3= {{ s, 0,-t}, { 0, s, t}, {0,0,1}}
H0= {{ s,0,s-1}, { 0,-s, t}, {0,0,1}}
H1= {{ 0, s, 0}, { s, 0,-2}, {0,0,1}}
H2= {{-s, 0, 2}, { 0,-s, 0}, {0,0,1}}
H3= {{ 0,-s, 0}, {-s, 0, 2}, {0,0,1}}
H4= {{ s, 0,-2}, { 0, s, 0}, {0,0,1}}
# Shapes
#------------------------------------
w1= Polygon({(p,-p), ( 1, 1), (-p,p), (-1,-1)})
h1= Polygon({(p,-p), (-1,-1), ( s,p), (-1,-1)})
# Iterations
#------------------------------------
w2= Zip(ApplyMatrix(M,O), M,{W1,W2,W3,H1,H2,H3,H4}, O, {w1,w1,w1,h1,h1,h1,h1})
h2= Zip(ApplyMatrix(M,O), M,{W1,W2,H0,H1,H2}, O, {w1,w1,h1,h1,h1})
w3= Zip(ApplyMatrix(M,O), M,{W1,W2,W3,H1,H2,H3,H4}, O, {w2,w2,w2,h2,h2,h2,h2})
h3= Zip(ApplyMatrix(M,O), M,{W1,W2,H0,H1,H2}, O, {w2,w2,h2,h2,h2})
w4= Zip(ApplyMatrix(M,O), M,{W1,W2,W3,H1,H2,H3,H4}, O, {w3,w3,w3,h3,h3,h3,h3})
h4= Zip(ApplyMatrix(M,O), M,{W1,W2,H0,H1,H2}, O, {w3,w3,h3,h3,h3})
w5= Zip(ApplyMatrix(M,O), M,{W1,W2,W3,H1,H2,H3,H4}, O, {w4,w4,w4,h4,h4,h4,h4})
#------------------------------------
# Settings
#------------------------------------
SetActiveView(1)
SetBackgroundColor("Dark Gray")
CenterView((-0.1,0))
Execute(Zip("on"+k+"=Checkbox({w"+k+"})",k,1..5))
SetValue(on5,false)
Execute(Zip("SetConditionToShowObject(h"+k+",false)", k,1..4))
Execute(Zip("SetColor(w"+k+",1,1,0.95)", k,1..5))
Execute(Zip("SetFilling(w"+k+",0.5)", k,1..5))
Execute(Zip("SetLineThickness(w"+k+",4)", k,1..5))