Notes:

  • The rule is defined by a four-digit number, where each digit must be from 0 to 7.
  • Digit 0-3 means rotation by 0,90,180,270 degrees.
  • Digit 4-7 means vertical flip followed by rotation of 0,90,180,270 degrees.
  • For each iteration, four copies are made and transformed as specified, then shrunk by half and moved to four corners.
  • The four digits correspond to transformations on upper-left, upper-right, lower-left and lower right, respectively.
  • There is a total of 8^4=4096 different rules, although some of them produce the same patterns.