Skip to main content

Display polyominos and polyomino tilings in various pretty formats.

Project description

pretty_poly - a package for displaying polyomino tilings

This is a Python package for displaying polyomino tilings, expressed as lists of lists of (x, y) tuples, in various ways.

Example use

>>> from pretty_poly import make_ascii
>>> print(make_ascii([[(0, 0), (0, 1), (0, 2), (1, 1)], [(0, 3), (1, 3), (2, 3), (1, 2)], [(1, 0), (2, 0), (3, 0), (2, 1)], [(3, 1), (3, 2), (2, 2)]]))
+-+-+-+-+
| |     |
+ +-+ +-+
|   | | |
+ +-+-+ +
| | |   |
+-+ +-+-+
|     |
+-+-+-+

Example output

You can see some examples of images created using this package:

  • Colored squares PNG
  • Outlines PNG
  • Thick outlines PNG

These files were created by the code in examples/make.py

How to cite this code:

@misc{pretty_poly,
  author = {Jack Grahl},
  title = {pretty_poly - a package for displaying polyomino tilings},
  year = {2021},
  howpublished = {\url{https://github.com/jwg4/pretty_poly}},
  commit = {...}
}

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

pretty_poly-0.6.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

pretty_poly-0.6.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file pretty_poly-0.6.0.tar.gz.

File metadata

  • Download URL: pretty_poly-0.6.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.13.2 Windows/10

File hashes

Hashes for pretty_poly-0.6.0.tar.gz
Algorithm Hash digest
SHA256 9836538e774a9b552f7d6290cf5a4146cce20b902bf5bd404fe8743d45b96306
MD5 c803dc32be39aa761b288498fca26ec7
BLAKE2b-256 cf463afbcb0d2167faaa876a554ce5c8a0c7913cf453ca8e98373c905b074bfa

See more details on using hashes here.

File details

Details for the file pretty_poly-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: pretty_poly-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.13.2 Windows/10

File hashes

Hashes for pretty_poly-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 053deec70697071594432fa9e3d26b04ce4af87a45aaf24b53078fd6a685b08c
MD5 1639f42f0b2fcd820b2308d57a29d65a
BLAKE2b-256 8fca389495c8110382815c1978bafba9f39063dc444edd9d1acdfdaf63b41aa9

See more details on using hashes here.

Supported by

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