Example #1
0
def insidethenout():
    zero()
    for i in range(4):
        j = (i + 1) * 2
        k = 3 - i
        for z in range(j):
            for y in range(j):
                for x in range(j):
                    common.grid(x + k, y + k, z + k, 1)
        common.send()
        shifty.execute()
        if i != 4:
            zero()
Example #2
0
def outsidethenin():
    fill()
    for i in range(5):
        j = (4 - i) * 2
        k = i
        for z in range(j):
            for y in range(j):
                for x in range(j):
                    common.grid(x + k, y + k, z + k, 1)
        common.send()
        shifty.execute()
        if i != 4:
            zero()
Example #3
0
def fillfrombottom():
    maxz = 0
    for x in range(8):
        for y in range(8):
            for z in range(8):
                if common.gridfindstate(x, y, z) == 1:
                    maxz = z
            for z2 in range(8):
                if z2 < maxz:
                    common.grid(x, y, z2, 1)
            maxz = 0
    common.send()
    shifty.execute()
Example #4
0
def layerbylayer():
    for z in range(8):
        for y in range(8):
            for x in range(8):
                common.grid(x, y, z, 1)
        common.send()  # Has a sleep within it
        shifty.execute()
        time.sleep(1)
        for j in range(8):
            for i in range(8):
                common.grid(j, i, z, 0)
        common.send()
        shifty.execute()
        time.sleep()
Example #5
0
    def staysame(self):
        z = self.currentfreq

        for x in range(8):
            for y in range(8):
                common.grid(x, y, z, 1)

        common.send()
        shifty.execute()

        for x in range(8):
            for y in range(8):
                common.grid(x, y, z, 0)

        common.send()
        shifty.execute()
Example #6
0
def outsidetheninhollow():
    zero()
    for i in range(5):
        j = (4 - i) * 2
        pastj = j - 2
        k = i
        pastk = k + 1
        for z in range(j):
            for y in range(j):
                for x in range(j):
                    common.grid(x + k, y + k, z + k, 1)
        for z in range(pastj):
            for y in range(pastj):
                for x in range(pastj):
                    common.grid(x + pastk, y + pastk, z + pastk, 0)
        common.send()
        shifty.execute()
        zero()
Example #7
0
def fillfromtop():
    for x in range(8):
        x = 7 - x
        for y in range(8):
            minz = 7
            y = 7 - y
            for z in range(8):
                z = 7 - z
                if common.gridfindstate(x, y, z) == 1:
                    minz = z

            for z2 in range(8):
                z2 = 7 - z2
                if z2 > minz:
                    common.grid(x, y, z2, 1)
            minz = 0
    common.send()
    shifty.execute()
Example #8
0
def insidethenouthollow():
    zero()
    for i in range(4):
        j = (i + 1) * 2
        pastj = j - 2
        k = 3 - i
        pastk = k + 1
        for z in range(j):
            for y in range(j):
                for x in range(j):
                    common.grid(x + k, y + k, z + k, 1)

        for z in range(pastj):
            for y in range(pastj):
                for x in range(pastj):
                    common.grid(x + pastk, y + pastk, z + pastk, 0)
        common.send()
        shifty.execute()
        if i != 3:
            zero()
Example #9
0
def grid(x, y, z, state):
    common.grid(x, y, z, state)
Example #10
0
    def lowtohigh(self):
        z = self.currentfreq
        for i in range(6):
            j = (i + 1) * 2
            pastj = j - 2
            pasterj = j - 4
            k = 3 - i
            pastk = k + 1
            pasterk = k + 2

            # Turn on the inside circle of a layer
            if j > 10:
                for x in range(8):
                    for y in range(8):
                        common.grid(x, y, z + 1, 0)
            elif j > 8:
                for x in range(8):
                    for y in range(8):
                        common.grid(x + k, y + k, z, 0)
                        common.grid(x + k, y + k, z + 1, 1)
            else:
                for x in range(j):
                    for y in range(j):
                        common.grid(x + k, y + k, z, 1)
                        common.grid(x + k, y + k, z + 1, 0)

            # Turn off the past inside ring and turn on ring layer of the lower layer
            if j < 10:
                for x in range(pastj):
                    for y in range(pastj):
                        common.grid(x + pastk, y + pastk, z, 0)
                        common.grid(x + pastk, y + pastk, z + 1, 1)

            if pasterj >= 0:
                for x in range(pasterj):
                    for y in range(pasterj):
                        common.grid(x + pasterk, y + pasterk, z + 1, 0)

            common.send()
            shifty.execute()