SpaghettiMazeMaker

What's it?How?The Principle?The worthwhileness?Other notes?Where?日本語

Other decafish apps

SpaghettiMazeMaker Icon

What's it?

SpaghettiMazeMaker is a small application for MacOS X to generate 2D mazes with curved walls (non-cell-based) automatically.

There are many algorithms for generating mazes but almost all algorithms are based on a rectangular unit cell. Therefore the generated mazes have only four directions of walls and seems like boring crystals. SpaghettiMazeMaker generates mazes to have curved walls and no streight lines.

sample maze

A generated maze is fenced rectangular outer wall but all walls inside consist of curves. There are two gates for an entrance and an exit on the outer wall and there is only one path way from the entrance to the exit.

How?

First, download a zipped file indicated in the last section of the page, expand it to the application and README.txt file, double-click the application, choose "New..." menu at "File" main manu, then you can find a dialog titled "New Maze".

new dialog

Input three values, width and height of a maze and typical gate size, then push "build" button. Soon appears a empty window.

mazde window

As described in the window, drag and move two triangles to asign entrance and exit positions. You can put the triangles on top or bottom side of the outer wall not only left and right side, or even same side. After you fix the positions, then push "Build" button, and nothing is left for you except looking generation process. You can zoom the window to shrink and expand the maze, but the maze aspect ratio is always preserved and a scroll bar never appears.

A process of generation will finish when there are no rooms to build a new curved wall insde. You can export your new maze to a PDF file selecting "Export..." menu in "File" manu. you can edit the file using Bezier path editors like Adobe Illustrator because the exported PDF file consists only Bezier paths, not bitmaps. "Open..." and "Save" menu in "File" menu can read/write only parameters for maze generation, not a state of halfway of building a maze. It means a saved document cannot resume building a maze.

You can modify the parameters choosing "Details" menu.

Info Panel

It's meaningless to change parameters if you don't know the generating principle. You might have fun looking an influence on generating process by your groundless change. A paticular set of parameter values generates no walls or no route passing through. When you loose suitable parameter set, you can trash a preference file named jp.ne.decafish.SpaghettiMazeMaker.plist in your ~/Libraries/Preferences directory back to a default setting.

The principle?

The application extends curved walls randomly without crossing each other. Random extension of curves frequently causes crowded swarms or open spaces and rarely meets uniform distribution of walls. No random algorithms based on any minimal methods cannot avoid such a manner.

The application solves the problem to use non-minimal algorithm, generating a bumpy plane beforehand and then extending walls along the bumps.

Generation of the bumps, a potential in other words, is based on a optical phenomenon called "speckle", glaring appearance when a rough surface is lighted by a laser beam. Speckle has uniform and isotropic properties with randomness simultaneously. The application has a built-in numerical simulator of speckle phenomenon.

Detailed explanation is given in the author's blog page, but sorry in Japanese.

The worthwhileness?

We, mankind of today, live in a large number of straight lines. It has became easy for us to understand direction and distance by constructing all surrounding us using straight lines. If you ask the way to another place, Which is easier in Manhattan or in the heart of a mountain or a forest?

But there are full of curves in nature and straight lines are unsusual. Our ancestors went hunting and searched around for fruits surruounding curved boughs of trees or ridges of hills. Did they get lost their way?

Other notes?

SpaghettihMazeMaker runs on MacOS X10.4 and above (ready for Snow Leopard) and does not work on below 10.3 and other operating systems such as Windows.
But on 10.4 it is unconfirmed to function properly bacause the author have no 10.4 machine.
The application is built as 32bit universal binary (already cofirmed on PowerPC) with its size about 1.2MB.

THe latest version is 1.0C.

Changes in 1.0C:
  1. small but fatal bugs are fixed.
A document of the application of this release has an extention ".smsetting" and contains only parameter settings as mentioned above.

And

Where?

You can download the application here.
And also there is soruce files, Xcode3.1 project format. But the icon files are not included.
Please mail your impression or bug report to the author
. Have fun.