A truchet tiles generator
Project description
A truchet tiles generator
Creates a truchet pattern as a PNG bitmap.
Install
pip install truchet-tiling
Usage
import truchet_tiling.truchet_pattern as tp
from truchet_tiling.themes import BLUE_WAVES, RED_FLAMES, GREEN_FIELDS
image = tp.generate(
width=700,
height=500,
colors = RED_FLAMES,
directions='mixed',
arcs_probability=1,
stroke_color=0xFFFFFF,
stroke_width=6
)
Parameters: width (int): Minimal width of the pattern. height (int): Minimal height of the pattern. cell_size (int): Size of the cell in the pattern. arcs_probability (float): Probability of arcs in the pattern. Accepted float values in the range [0, 1]. directions (str): Direction of the pattern. Accepted values are ['mixed', 'horizontal', 'vertical']. colors (List[int]): List of colors to use in the pattern. With Null a random color set will be used. stroke_color (int): Color of the strokes. stroke_width (int): Width of the strokes.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file truchet_tiling-0.0.31.tar.gz.
File metadata
- Download URL: truchet_tiling-0.0.31.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c43a97730b424e288b52c3aadf5419191cd8542884cd48efbd9096c6efd96108
|
|
| MD5 |
f002badcf59b8944520376bf7af4d683
|
|
| BLAKE2b-256 |
a497a0bd7f248d7b5b9ca47dbf466600d53149d73dd74ac8b636b6d77189a99e
|
File details
Details for the file truchet_tiling-0.0.31-py3-none-any.whl.
File metadata
- Download URL: truchet_tiling-0.0.31-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b258d616e780037219b97b814a1c9993ee6f67e79c70034b9777a17b61b565c6
|
|
| MD5 |
461243e71f57aae94df55039ddd60403
|
|
| BLAKE2b-256 |
546083735d9c7e9ed980b0688ecb5492b1d85406b4500ddef2312e3c18b918f4
|