Skip to main content
1 of 2
MelaGo
  • 9.1k
  • 1
  • 11
  • 26
shape = {{1, 0, 1}, {0, 1, 0}, {1, 0, 1}};
newshape[oldshape_] := 
 Flatten[Table[
   Table[p shape, {p, row}], {row, oldshape}], {{1, 3}, {2, 4}}]

fr = NestList[newshape, shape, 3];
Row[ArrayPlot[#, Frame -> None, ImageSize -> 200] & /@ fr, Spacer[5]]

enter image description here

Or

Row[ColorNegate@Image[#, ImageSize -> 200] & /@ fr, Spacer[5]]

enter image description here

MelaGo
  • 9.1k
  • 1
  • 11
  • 26