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:
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
Release history Release notifications | RSS feed
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.5.1.tar.gz
(6.3 kB
view details)
Built Distribution
File details
Details for the file pretty_poly-0.5.1.tar.gz
.
File metadata
- Download URL: pretty_poly-0.5.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.7.12 Linux/5.11.0-1022-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | acd1214aab5f9f3e93b142762ff82485369e1fb532489b4895b29da84afb7a8e |
|
MD5 | 34ada3cc6d97966c22b73aea447b1f55 |
|
BLAKE2b-256 | 314724a6d1364a1dad0a6359150f49922cc5b2c45882108cb296a1d4ffc8f33f |
File details
Details for the file pretty_poly-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: pretty_poly-0.5.1-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.7.12 Linux/5.11.0-1022-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64dd122b69781d44aa7a83e22262a917d362f1f34e1a125d0bf199f0c645db80 |
|
MD5 | 766f8a561e3babd578b9caa1a41b15e3 |
|
BLAKE2b-256 | 47cf0bbb92b3399acd464304d1f150989fb5f2dc8c28dd27c3e5c2a891be07a4 |