Skip to main content

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


Download files

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

Source Distribution

truchet_tiling-0.0.31.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

truchet_tiling-0.0.31-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

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

Hashes for truchet_tiling-0.0.31.tar.gz
Algorithm Hash digest
SHA256 c43a97730b424e288b52c3aadf5419191cd8542884cd48efbd9096c6efd96108
MD5 f002badcf59b8944520376bf7af4d683
BLAKE2b-256 a497a0bd7f248d7b5b9ca47dbf466600d53149d73dd74ac8b636b6d77189a99e

See more details on using hashes here.

File details

Details for the file truchet_tiling-0.0.31-py3-none-any.whl.

File metadata

File hashes

Hashes for truchet_tiling-0.0.31-py3-none-any.whl
Algorithm Hash digest
SHA256 b258d616e780037219b97b814a1c9993ee6f67e79c70034b9777a17b61b565c6
MD5 461243e71f57aae94df55039ddd60403
BLAKE2b-256 546083735d9c7e9ed980b0688ecb5492b1d85406b4500ddef2312e3c18b918f4

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