A 3D Python Maze for Art of Illusion
I 've always had a fascination with mazes. While messing with the Python plugin for Art of Illusion I decided to write a maze generator in Python. The image to the right is a rendering of the maze that is produced by that code. I did it as a Scripted Object, which was probably not the best idea since it recalculates the maze whenever something changes, but my excuse is that I was testing out some things related to Python scripted objects in Art of Illusion. I'm including the code below, but with the caveat that it has a defect at one of the boundaries that I haven't figured out yet. It doesn't remove a wall for one or two of the cells. Aside from that, it will produce a good 3D maze. import random mazeWidth = 25 mazeLength = 25 wallLength = 1.2 wallHeight = 2.25 wallThickness = 0.05 WALL_UP = 0 WALL_DOWN = 1 WALL_FIXED = 2 class cell(): X = 0 Y = 0 N = WALL_UP S = WALL_UP E = WALL_UP W = WALL_UP visited = False def createm...