Symmetric Chaos
The script symchaos.py generates chaotic images with translational (wallpaper) or rotational symmetry, as pioneered by Field and Golubitsky [1].
Installation:
First, install the package with pip:
pip3 install symchaos
Next, find the location where the installed files are:
pip3 show -f symchaos
Copy the whole symchaos directory to a place where you have read and
write access. Now you can change into this directory and start the
script symchaos.py.
Dependencies:
Symchaos needs the python modules argparse, ast, configparser,
datetime, math, matplotlib.pyplot, numpy, os, pylab,
random, re, shutil, and sys.
The pure python version is fine for testing but very slow. To speed up
the calculations, it is strongly recommended to use the Fortran90 code
symchaos.f90 and use the fortran to python interface generator f2py
from numpy (https://numpy.org/doc/stable/f2py).
Usage:
Execute symchaos.py and provide a config file from the ini/
directory, for example:
symchaos.py ini/example.ini
For a quick test without installing a Fortran90 compiler, type:
symchaos.py ini/nof90.ini
If f2py is available, the Fortran90 code can be compiled with:
f2py -c symchaos.f90 -m symchaos_f90
Now, all config files from the ini/ directory can be used, e.g.,
clifford.ini, fern.ini, mondrian.ini, quilt.ini, rot9.ini etc.
The images are saved inside the output directory.
Configuration:
Generation of the images is controlled via a config (*.ini) file. The
keys are:
method: The method determines which formula is used bysymchaos.f90. Available methods are:clifford: Clifford attractorfern: Barnsley fernhopalong: Hopalong attractor by Barry Martinmondrian: images reminding me of Piet Mondrianquilt*: several quilts (wallpapers)rot_sym: images with rotational C_n symmetrytriangle: images looking a bit like triangles
a,b,c,d,e,n: These parameters are part of the formulas of the methods.vary_steps: Ifvary_steps> 1, then several images are created, using different parametersa,b,c,d,e.vary_type: Ifvary_steps> 1, thenvary_typedetermines how the parameters are varied:cyclic: starting and ending at the initial parametersneighborhood: random values in the neighborhood of the initial parametersrandom: random valuesrandom_walk: a random walk, starting at the initial parameters
vary_value: The magnitude of the parameter variationpalette: The matplotlib color palette [3] used to create an image. The default is the rainbow palette, settingpalette = *uses all palettes.resolution: A tuple defining the x,y resolution of the image, e.g.,resolution = (100,100).MAKETILES: If set toTrue, a tiled image is also created. This is only useful for wallpapers with translational symmetry.USE_FORTRAN: If set toTrue, use the fast Fortran90 codesymchaos.f90.
Further explanations can be found in the comments of the example.ini
config file.
References:
[1] Symmetric Chaos, Mike Field, and Martin Golubitsky, Computers in Physics 4, 470 (1990), https://doi.org/10.1063/1.4822939
[2] Christmas in the House of Chaos, Scientific American, Dec 1992, JSTOR 24939340
[3] List of matplotlib palettes: https://matplotlib.org/stable/gallery/color/colormap_reference.html
Metadata
Release files for symchaos 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| symchaos-0.9.0.tar.gz | 10.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| symchaos-0.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.5 kB
Release files / symchaos-0.9.0.tar.gz
| Download URL | symchaos-0.9.0.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
435ed5bb9b59f40731e5546322ebd3f3969a705a7e40178017b9ff99878d21a4
|
|
BLAKE2b-256 checksum How to use checksums |
3f83c256e55d2ea87d9756be95fecad4afd6c8622686bef16d9a4dddc848d9d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/54.2.0 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.6.9
|
Release files / symchaos-0.9.0-py3-none-any.whl
| Download URL | symchaos-0.9.0-py3-none-any.whl |
|---|---|
| Size | 29.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
75ba277c03e080f02edd9534d0509ee1ccb39e21e8864e9b4af4c4a6dac770f7
|
|
BLAKE2b-256 checksum How to use checksums |
0156aa7650e27b1e9eeea4cc39cfe510935b61615471413a86e3627ad5a69d2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/54.2.0 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.6.9
|