import "al_cell.lt"   # <- defines the 4-atom "AlCell" FCC Aluminum unit cell

# A Sierpinski cube resembles a 3x3x3 Rubik's-cube-like object with the smaller
# cube in each central face (and in the interior) removed. There are 3x3x3-7=20 
# remaining sub-cubes.  Each of these 20 sub-cubes is a smaller SierpinskiCube.
# To build a SierpinskiCube, you can list all 20 sub-cubes, or you can fill a 
# 3x3x3 cube with sub-cubes and delete the interior sub-cubes. (The later
# approach is used in file "elegant_inefficient_version/sierpinski_cubes.lt")



SierpinskiCubeLvl1 {
  # Again, a Sierpinski-cube is constructed of 20 smaller cube-shaped objects.
  # Here, the small cube-shaped objects are "AlCells" (defined in "al_cell.lt").
  # I could list out the positions of all 20 AlCells, (and this would be clearer
  # for the reader).  However instead I built it from a combination of
  # two-dimensional and three-dimensional arrays of AlCells (explained below).

  # The next command creates 4 AlCells at: (0, 4.05, 0.0), (8.1, 4.05, 0.0),
  #                                        (0, 4.05, 8.1), (8.1, 4.05, 8.1)

  cells_xz = new AlCell.move(0.00, 4.05, 0.00) [2].move(8.10, 0.0, 0.0 )
                                               [2].move(0.0,  0.0, 8.10)

  # The next command creates 4 AlCells at: (4.05, 0, 0.0), (4.05, 8.1, 0.0),
  #                                        (4.05, 0, 8.1), (4.05, 8.1, 8.1)

  cells_yz = new AlCell.move(4.05, 0.00, 0.00) [2].move(0.0, 8.10, 0.0 )
                                               [2].move(0.0,  0.0, 8.10)

  # The next command creates 12 AlCells (2x2x3) at:
  # (0.0, 0.0, 0.0), (0.0, 0.0, 4.05), (0.0, 0.0, 8.1)
  # (0.0, 8.1, 0.0), (0.0, 8.1, 4.05), (0.0, 8.1, 8.1)
  # (8.1, 8.1, 0.0), (8.1, 8.1, 4.05), (8.1, 8.1, 8.1)

  cells_z  = new AlCell [2].move(8.10, 0.00, 0.00)
                        [2].move(0.00, 8.10, 0.00)
                        [3].move(0.00, 0.00, 4.05)
}



SierpinskiCubeLvl2 {
  # Identical arrangement to SierpinskiCube1 (with 3x larger length scales)
  cells_xz= new SierpinskiCubeLvl1.move(0.0,12.15,0.0) [2].move(24.3, 0.0, 0.0 )
                                                       [2].move(0.0,  0.0, 24.3)
  cells_yz= new SierpinskiCubeLvl1.move(12.15,0.0,0.0) [2].move(0.0, 24.3, 0.0 )
                                                       [2].move(0.0,  0.0, 24.3)
  cells_z = new SierpinskiCubeLvl1 [2].move(24.3, 0.00, 0.00)
                                [2].move(0.00, 24.3, 0.00)
                                [3].move(0.00, 0.00, 12.15)
}



SierpinskiCubeLvl3 {
  # Identical arrangement to SierpinskiCube2 (with 3x larger length scales)
  cells_xz= new SierpinskiCubeLvl2.move(0.0,36.45,0.0) [2].move(72.9, 0.0, 0.0 )
                                                       [2].move(0.0,  0.0, 72.9)
  cells_yz= new SierpinskiCubeLvl2.move(36.45,0.0,0.0) [2].move(0.0, 72.9, 0.0 )
                                                       [2].move(0.0,  0.0, 72.9)
  cells_z = new SierpinskiCubeLvl2 [2].move(72.9, 0.00, 0.00)
                                   [2].move(0.00, 72.9, 0.00)
                                   [3].move(0.00, 0.00, 36.45)
}

