Skip to main content

Create polygon-tesselation mazes from a variety of sources.

Project description

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 when making a String maze (especially for unicode strings)

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

https://github.com/kobejohn/polymaze/raw/master/docs/Globe_Polycat_small.png https://github.com/kobejohn/polymaze/raw/master/docs/String_small.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 PILLOW did not install completely. Try to upgrade or reinstall PILLOW and make sure it says png support was installed.

Commandline Usage:

To make a generic rectangular maze, at the command line:

polymaze

To see all options:

polymaze -h

For example, to make a string into a maze with some extra options (note the n gets converted to a real newline internally):

polymaze --string "Happy\nBirthday!" --complexity 10 --shape Polycat

Everything above assumes the command line entry point (named polymaze) works after installation. If not, then you will need to replace “polymaze …” with

python /your_install_location/polymaze/cli.py ...

Library Usage:

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

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.6.5.zip (147.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

polymaze-0.6.5-py2.py3-none-any.whl (144.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file polymaze-0.6.5.zip.

File metadata

  • Download URL: polymaze-0.6.5.zip
  • Upload date:
  • Size: 147.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for polymaze-0.6.5.zip
Algorithm Hash digest
SHA256 9db4f92fe53f930373bb3bd12757a26255bcf9d2e4f5a78546be19c985a0df11
MD5 f3c9a3e9cd9f09e61841ef66b6871518
BLAKE2b-256 07bddca27abf0894eb681201cbc776338d84202e8b87d6917a7dd8959bf66193

See more details on using hashes here.

File details

Details for the file polymaze-0.6.5-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for polymaze-0.6.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 be597b33ef5c18f4af3da831b57d32ab5ae542aa3bfc55e86bfdc697f49b6bbe
MD5 ec96f278cd2e68a2999655009b8ef452
BLAKE2b-256 f981fbf4317a4e21155bdf069370cf1f6ec4fc8462d487132c537eb225d9d67a

See more details on using hashes here.

Supported by

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