Skip to main content

Create polygon-tesselation mazes from a variety of sources.

Project description

PolyMaze - Create mazes from a variety of sources

This utility converts several different kinds of inputs into mazes.

Allowed Inputs:

  • Aspect ratio (height / width) of a rectangular maze

  • String - convert the content of the string into a maze / mazes

  • Image - convert the dark parts of an image into a maze / mazes

Options:

  • Complexity - adjust the difficulty

  • Font - use your own font (especially for unicode strings)

  • Shape - explicitly choose the type of tesselation used in the maze

http://raw.githubusercontent.com/kobejohn/polymaze/master/demo/Globe%20%28Polycat%29.png

Installation:

polymaze should work with Py2 or Py3.

pip install polymaze

If you get the error decoder zip not available when using it, then probably PIL/PILLOW did not install completely. You can try:

pip install -use-wheel pillow

Commandline Usage:

To make a generic rectangular maze:

python polymaze.py

To see all options:

python polymaze.py -h

For example, to make a string into a maze with some extra options:

python polymaze.py –string “Happy Birthday!” –complexity 10 –shape Polycat

Library Usage:

Please see demo/demo.py for examples of how to use the different parts.

The primary components are PolyGrid (the geometric core of the whole package), and PolyMaze which converts a PolyGrid into a maze.

Extension:

If anyone is interested, I can document how to specify new tessellations.

Background and Feedback:

I developed this to regain some of my basic trigonometry skills which I have lost over the years.

If you find this useful or have any feedback, please let me know! Specifically I have only tested this on Windows so please make an issue if it doesn’t work in linux, etc.

License:

MIT. See LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

polymaze-0.5.2.zip (144.6 kB view hashes)

Uploaded Source

Built Distribution

polymaze-0.5.2-py2.py3-none-any.whl (142.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page