September 4, 2022
Description
You can create a single maze, or several stacking mazes where, after you complete a level, the ball drops to the one below it.
The SCAD code will generate a maze based on the variables you set. The available parameters are:
sides - number of sides
wallWidth - wall and bottom thickness
wallHeight - height of wall above bottom
pathWidth - minimum space between walls
mazeDia - diameter (or diagonal width) of maze
marbleDia - marble diameter (optional; set to 0 for none)
centerExit - if true, put the exit in the center
pedestal - if true, add a starting pedestal in the center
clips - if true, generate clips for stacking instead of a maze
easyClips - if true, the clips are longer, making it easier to view lower levels
The centerExit and pedestal parameters allow several mazes to be stacked. The order of stacking should be, from top to bottom:
1. pedestal=true, centerExit=false
2. pedestal=false, centerExit=true
3. pedestal=false, centerExit=false
..and 2&3 can be alternated several times as needed, making a stack as tall as you want.
The play then becomes a matter of navigating the ball to the exit on the outer rim, letting it drop to the next level, navigating it to the center exit, letting it drop, and so on.
For the most part, the code generates reasonably playable mazes. And if you don't like the layout, you can always hit "render" again. Note: Due to the random number generators, hitting “preview”, then “render” will not get you the same maze as you previewed.
And here's me, attempting to solve my own maze…
License:
Creative Commons — Public Domain