1
import "al_cell.lt" # <- defines the 4-atom "AlCell" FCC Aluminum unit cell
3
# A Menger cube is a fractal which resembles a 3x3x3 Rubik's-cube. It has a
4
# cube in each central face (and in the interior) removed. There are 3x3x3-7=20
5
# remaining sub-cubes. Each of these 20 sub-cubes is a smaller MengerCube.
6
# To build a MengerCube, you can list all 20 sub-cubes, or you can fill a
7
# 3x3x3 cube with sub-cubes and delete the interior sub-cubes. (The later
8
# approach is used in file "elegant_inefficient_version/menger_cubes.lt")
13
# Again, a Menger-cube is constructed of 20 smaller cube-shaped objects.
14
# Here, the small cube-shaped objects are "AlCells" (defined in "al_cell.lt").
15
# I could list out the positions of all 20 AlCells, (and this would be clearer
16
# for the reader). However instead I built it from a combination of
17
# two-dimensional and three-dimensional arrays of AlCells (explained below).
19
# The next command creates 12 AlCells (2x2x3) at:
20
# (0.0, 0.0, 0.0), (0.0, 0.0, 4.05), (0.0, 0.0, 8.1)
21
# (0.0, 8.1, 0.0), (0.0, 8.1, 4.05), (0.0, 8.1, 8.1)
22
# (8.1, 8.1, 0.0), (8.1, 8.1, 4.05), (8.1, 8.1, 8.1)
24
cells_z = new AlCell [2].move(8.10, 0.00, 0.00)
25
[2].move(0.00, 8.10, 0.00)
26
[3].move(0.00, 0.00, 4.05)
28
# The next command creates 4 AlCells at: (0, 4.05, 0.0), (8.1, 4.05, 0.0),
29
# (0, 4.05, 8.1), (8.1, 4.05, 8.1)
31
cells_xz = new AlCell.move(0.00, 4.05, 0.00) [2].move(8.10, 0.0, 0.0 )
32
[2].move(0.0, 0.0, 8.10)
34
# The next command creates 4 AlCells at: (4.05, 0, 0.0), (4.05, 8.1, 0.0),
35
# (4.05, 0, 8.1), (4.05, 8.1, 8.1)
37
cells_yz = new AlCell.move(4.05, 0.00, 0.00) [2].move(0.0, 8.10, 0.0 )
38
[2].move(0.0, 0.0, 8.10)
44
# Identical arrangement to MengerCube1 (with 3x larger length scales)
45
cells_z = new MengerCubeLvl1 [2].move(24.3, 0.00, 0.00)
46
[2].move(0.00, 24.3, 0.00)
47
[3].move(0.00, 0.00, 12.15)
48
cells_xz= new MengerCubeLvl1.move(0.0,12.15,0.0) [2].move(24.3, 0.0, 0.0 )
49
[2].move(0.0, 0.0, 24.3)
50
cells_yz= new MengerCubeLvl1.move(12.15,0.0,0.0) [2].move(0.0, 24.3, 0.0 )
51
[2].move(0.0, 0.0, 24.3)
57
# Identical arrangement to MengerCube2 (with 3x larger length scales)
58
cells_z = new MengerCubeLvl2 [2].move(72.9, 0.00, 0.00)
59
[2].move(0.00, 72.9, 0.00)
60
[3].move(0.00, 0.00, 36.45)
61
cells_xz= new MengerCubeLvl2.move(0.0,36.45,0.0) [2].move(72.9, 0.0, 0.0 )
62
[2].move(0.0, 0.0, 72.9)
63
cells_yz= new MengerCubeLvl2.move(36.45,0.0,0.0) [2].move(0.0, 72.9, 0.0 )
64
[2].move(0.0, 0.0, 72.9)