Python Experiments (version 0.1)

(Creation: Feb. 28, 2012, 12:31 p.m. , last release: Sept. 10, 2012, 12:31 p.m. )

Experimental, pointless or poetic codes

Related tools

Hexacrochay | Matrix | Dna | Icescreen | Ninjatraining |

Hexacrochay

v3.2 (09/12/2018)

Hexacrochay software montage

Purpose

Tool for pattern generation based on a defined palette of colors. Works for squares / hexagons / horizontal stripes. The system generates color layouts based of number of wanted colors and neighbour constraints : the base constraint is that the system forbids to have two patches (square/hexagon...) of having the same color. (for squares, the option "allow neighbours" only constraints vertical and horizontal neighbours and not diagonals. Random patterns are also under a frequency constraint: during the layout creation less frequent colors will have more chances of being picked, so at the end each color will have a similar number of cells (but not necessary identical).

Usage

Requires Python and WX, local use. Run by launching python hexacrochay.py (you can add a generated file at the end of the "python ..." line for direct use). Set the available colors in the file palette.txt in the same folder than the scripts.
The layout can be changed without changing the colors via the button "change layout", or change the colors without modifying the layout via "change colors". The current layout and colors can be saved via the "save all" button. It will generate a file like "hexaColors_42_viaWX_5041.txt" with hexa/li/sq the patch geometry, 42 is the number of colors, and a random suffix to avoid accidental overwriting. The window also allows to load an existing file.
The number of cells by color is written in the right column.
For squares and stripes, the color of an individual cell can be changed by clicking the cell. It will chose an other color in the authorized list, with a ponderized random selection based on color frequencies.

Format

Example of palette.txt
Example of output color file

Direct link

Last news

New experimental tool: Ninja Training (Aug. 10, 2024, 8:13 p.m. by Lem):

To improve and follow reaction time on various exercises. See here


| RSS feed for all notifications | for dev news only