17 Cubes-Code Reference
17-01, Cube
# top and bottom
for j in [10, 19]:
flat_xz(20,j,-20,10,10, 'brick')
# front and back
for k in [-20, -11]:
flat_xy(20,10,k,10,10, 'brick')
# the sides
for i in [20, 29]:
flat_yz(i,10,-20,10,10, 'brick')
17-02, Hollow Cube
# Hollow cube, cobblestone
for j in [10,20]:
for k in [-20, -10]:
bar_x(1, j, k, 10, 'cobblestone')
for i in [1,10]:
for k in [-20, -10]:
bar_y(i, 10, k, 10, 'cobblestone')
for j in [10,20]:
for i in [1,10]:
bar_z(i, j, -20, 10, 'cobblestone')
17-03, Function hollow_cube(x,y,z,a,m)
def hollow_cube(x,y,z,a,m):
for j in [y,y+a-1]:
for k in [z, z+a-1]:
bar_x(x, j, k, a, m)
for i in [x,x+a-1]:
for k in [z, z+a-1]:
bar_y(i, y, k, a, m)
for j in [y,y+a-1]:
for i in [x,x+a-1]:
bar_z(i, j, z, a, m)