<div align="center">
<img src="https://github.com/sepandhaghighi/samila/raw/master/otherfiles/logo.png" width=400 height=400>
<br/>
<h1>Samila</h1>
<br/>
<a href="https://www.python.org/"><img src="https://img.shields.io/badge/built%20with-Python3-green.svg" alt="built with Python3"></a>
<a href="https://codecov.io/gh/sepandhaghighi/samila"><img src="https://codecov.io/gh/sepandhaghighi/samila/branch/master/graph/badge.svg"></a>
<a href="https://badge.fury.io/py/samila"><img src="https://badge.fury.io/py/samila.svg" alt="PyPI version" height="18"></a>
<a href="https://anaconda.org/sepandhaghighi/samila"><img src="https://anaconda.org/sepandhaghighi/samila/badges/version.svg"></a>
<a href="https://colab.research.google.com/github/sepandhaghighi/samila/blob/master"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Samila-Colab"></a>
<a href="https://discord.com/invite/94bz5QGZWb"><img src="https://img.shields.io/discord/900055829225562162.svg" alt="Discord Channel"></a>
</div>
## Overview
<p align="justify">
Samila is a generative art generator written in Python, Samila lets you create images based on many thousand points. The position of every single point is calculated by a formula, which has random parameters. Because of the random numbers, every image looks different.
</p>
<table>
<tr>
<td align="center">Open Hub</td>
<td align="center"><a href="https://www.openhub.net/p/samila"><img src="https://www.openhub.net/p/samila/widgets/project_thin_badge.gif"></a></td>
</tr>
<tr>
<td align="center">PyPI Counter</td>
<td align="center"><a href="http://pepy.tech/project/samila"><img src="http://pepy.tech/badge/samila"></a></td>
</tr>
<tr>
<td align="center">Github Stars</td>
<td align="center"><a href="https://github.com/sepandhaghighi/samila"><img src="https://img.shields.io/github/stars/sepandhaghighi/samila.svg?style=social&label=Stars"></a></td>
</tr>
</table>
<table>
<tr>
<td align="center">Branch</td>
<td align="center">master</td>
<td align="center">dev</td>
</tr>
<tr>
<td align="center">CI</td>
<td align="center"><img src="https://github.com/sepandhaghighi/samila/actions/workflows/test.yml/badge.svg?branch=master"></td>
<td align="center"><img src="https://github.com/sepandhaghighi/samila/actions/workflows/test.yml/badge.svg?branch=dev"></td>
</tr>
</table>
<table>
<tr>
<td align="center">Code Quality</td>
<td><a href="https://www.codacy.com/gh/sepandhaghighi/samila/dashboard?utm_source=github.com&utm_medium=referral&utm_content=sepandhaghighi/samila&utm_campaign=Badge_Grade"><img src="https://app.codacy.com/project/badge/Grade/14df8ed5f8434aaea85889555b0182a9"/></a></td>
<td><a href="https://codebeat.co/projects/github-com-sepandhaghighi-samila-dev"><img alt="codebeat badge" src="https://codebeat.co/badges/01e6aa48-4cc2-4d9c-8288-c9fb490ad371" /></a></td>
<td><a href="https://www.codefactor.io/repository/github/sepandhaghighi/samila"><img src="https://www.codefactor.io/repository/github/sepandhaghighi/samila/badge" alt="CodeFactor" /></a></td>
</tr>
</table>
## Installation
### PyPI
- Check [Python Packaging User Guide](https://packaging.python.org/installing/)
- Run `pip install samila==1.4`
### Source code
- Download [Version 1.4](https://github.com/sepandhaghighi/samila/archive/v1.4.zip) or [Latest Source](https://github.com/sepandhaghighi/samila/archive/dev.zip)
- Run `pip install .`
### Conda
- Check [Conda Managing Package](https://conda.io)
- `conda install -c sepandhaghighi samila`
## Usage
### Magic
```pycon
>>> import matplotlib.pyplot as plt
>>> from samila import GenerativeImage
>>> g = GenerativeImage()
>>> g.generate()
>>> g.plot()
>>> plt.show()
```
<img src="https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/7.png">
ℹ️ You can change function generation seed by `func_seed` parameter in `GenerativeImage`
### Basic
```pycon
>>> import random
>>> import math
>>> def f1(x, y):
result = random.uniform(-1,1) * x**2 - math.sin(y**2) + abs(y-x)
return result
>>> def f2(x, y):
result = random.uniform(-1,1) * y**3 - math.cos(x**2) + 2*x
return result
>>> g = GenerativeImage(f1, f2)
>>> g.generate()
>>> g.plot()
>>> g.seed
188781
>>> plt.show()
```
<img src="https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/1.png">
### Generation mode
```pycon
>>> from samila import GenerateMode
>>> g = GenerativeImage(f1, f2)
>>> g.generate(mode=GenerateMode.F1_VS_INDEX)
>>> g.plot()
>>> g.seed
883114
>>> plt.show()
```
<img src="https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/10.png">
ℹ️ Supported modes : `F1_VS_F2`, `F2_VS_F1`, `F1_VS_INDEX`, `F2_VS_INDEX`, `INDEX_VS_F1`, `INDEX_VS_F2`, `F1_VS_X1`, `F1_VS_X2`, `F2_VS_X1`, `F2_VS_X2`, `X1_VS_F1`, `X1_VS_F2`, `X2_VS_F1` and `X2_VS_F2`
ℹ️ Default mode is `F1_VS_F2`
### Projection
```pycon
>>> from samila import Projection
>>> g = GenerativeImage(f1, f2)
>>> g.generate()
>>> g.plot(projection=Projection.POLAR)
>>> g.seed
829730
>>> plt.show()
```
<img src="https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/2.png">
ℹ️ Supported projections : `RECTILINEAR`, `POLAR`, `AITOFF`, `HAMMER`, `LAMBERT`, `MOLLWEIDE` and `RANDOM`
ℹ️ Default projection is `RECTILINEAR`
### Marker
```pycon
>>> from samila import Marker
>>> g = GenerativeImage(f1, f2)
>>> g.generate()
>>> g.plot(marker=Marker.CIRCLE, spot_size=10)
>>> g.seed
448742
>>> plt.show()
```
<img src="https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/9.png">
ℹ️ Supported markers : `POINT`, `PIXEL`, `CIRCLE`, `TRIANGLE_DOWN`, `TRIANGLE_UP`, `TRIANGLE_LEFT`, `TRIANGLE_RIGHT`, `TRI_DOWN`, `TRI_UP`, `TRI_LEFT`, `TRI_RIGHT`, `OCTAGON`, `SQUARE`, `PENTAGON`, `PLUS`, `PLUS_FILLED`, `STAR`, `HEXAGON_VERTICAL`, `HEXAGON_HORIZONTAL`, `X`, `X_FILLED`, `DIAMOND`, `DIAMON_THIN`, `VLINE`, `HLINE` and `RANDOM`
ℹ️ Default marker is `POINT`
### Rotation
You can even rotate your art by using `rotation` parameter. Enter your desired rotation for the image in degrees and you will have it.
```pycon
>>> g = GenerativeImage(f1, f2)
>>> g.generate()
>>> g.plot(rotation=45)
```
ℹ️ Default rotation is `0`
### Range
```pycon
>>> g = GenerativeImage(f1, f2)
>>> g.generate(start=-2*math.pi, step=0.01, stop=0)
>>> g.plot()
>>> g.seed
234752
>>> plt.show()
```
<img src="https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/3.png">
ℹ️ Default range is $(-\pi, \pi)$
### Color
```pycon
>>> g = GenerativeImage(f1, f2)
>>> g.generate()
>>> g.plot(color="yellow", bgcolor="black", projection=Projection.POLAR)
>>> g.seed
1018273
>>> plt.show()
```
<img src="https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/4.png">
ℹ️ Default color is `black`
ℹ️ Default background-color is `white`
ℹ️ Supported colors are available in `VALID_COLORS` list
ℹ️ `color` and `bgcolor` parameters supported formats:
1. Color name (example: `color="yellow"`)
2. RGB/RGBA (example: `color=(0.1,0.1,0.1)`, `color=(0.1,0.1,0.1,0.1)`)
3. Hex (example: `color="#eeefff"`)
4. Random (example: `color="random"`)
5. Complement (example: `color="complement", bgcolor="blue"`)
6. Transparent (example: `bgcolor="transparent"`)
7. List (example: `color=["black", "#fffeef",...]`)
⚠️ **Transparent** mode is only available for background
⚠️ **List** mode is only available for color
⚠️ In **List** mode, the length of this list must be equal to the lengths of data1 and data2
#### Point color
You can make your custom color map and use it in Samila.
```pycon
>>> colorarray = [
... [0.7, 0.2, 0.2, 1],
... [0.6, 0.3, 0.2, 1],
... "black",
... [0.4, 0.4, 0.3, 1],
... [0.3, 0.4, 0.4, 1],
... "#ff2561"]
>>> g.generate()
>>> g.seed
454893
>>> g.plot(cmap=colorarray, color=g.data2, projection=Projection.POLAR)
>>> plt.show()
```
<img src="https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/8.png">
### Regeneration
```pycon
>>> g = GenerativeImage(f1, f2)
>>> g.generate(seed=1018273)
>>> g.plot(projection=Projection.POLAR)
>>> plt.show()
```
<img src="https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/5.png">
### NFT.storage
Upload generated image directly to [NFT.storage](https://NFT.storage)
```pycon
>>> g.nft_storage(api_key="YOUR_API_KEY", timeout=5000)
{'status': True, 'message': 'FILE_LINK'}
```
You can also upload your config/data to nft storage as follows:
```pycon
>>> g.nft_storage(api_key="API_KEY", upload_config=True)
{'status': {'image': True, 'config':True}, 'message': {'image':'IMAGE_FILE_LINK', 'config':'CONFIG_FILE_LINK'}
```
or
```pycon
>>> g.nft_storage(api_key="API_KEY", upload_data=True)
{'status': {'image': True, 'data':True}, 'message': {'image':'IMAGE_FILE_LINK', 'data':'DATA_FILE_LINK'}
```
You have the option to choose a specific IPFS gateway:
```pycon
>>> from samila import Gateway
>>> g.nft_storage(api_key="API_KEY", upload_data=True, gateway=Gateway.DWEB)
{'status': {'image': True, 'data':True}, 'message': {'image':'IMAGE_FILE_LINK', 'data':'DATA_FILE_LINK'}
```
⚠️ This method is deprecated and may be removed in future releases
ℹ️ Default timeout is `3000` seconds
ℹ️ Default gateway is `IPFS_IO`
### Save image
Save generated image.
```pycon
>>> g.save_image(file_adr="test.png")
{'status': True, 'message': 'FILE_PATH'}
```
Save generated image in higher resolutions.
```pycon
>>> g.save_image(file_adr="test.png", depth=5)
{'status': True, 'message': 'FILE_PATH'}
```
### Save data
Save generated image data.
```pycon
>>> g.save_data(file_adr="data.json")
{'status': True, 'message': 'FILE_PATH'}
```
So you can load it into a `GenerativeImage` instance later by
```pycon
>>> g = GenerativeImage(data=open('data.json', 'r'))
```
Data structure:
```JSON
{
"plot": {
"projection": "polar",
"bgcolor": "black",
"color": "snow",
"spot_size": 0.01
},
"matplotlib_version": "3.0.3",
"data1": [
0.3886741692042526,
22.57390286376703,
-0.1646310981668766,
66.23632344600155
],
"data2": [
-0.14588750183600108,
20.197945942677833,
0.5485453260942901,
-589.3284610518896
]
}
```
### Save config
Save generated image config. It contains string formats of functions which is also human readable.
```pycon
>>> g.save_config(file_adr="config.json")
{'status': True, 'message': 'FILE_PATH'}
```
So you can load it into a `GenerativeImage` instance later by
```pycon
>>> g = GenerativeImage(config=open('config.json', 'r'))
```
Config structure:
```JSON
{
"matplotlib_version": "3.0.3",
"generate": {
"seed": 379184,
"stop": 3.141592653589793,
"step": 0.01,
"start": -3.141592653589793
},
"f2": "random.uniform(-1,1)*math.cos(x*(y**3))+random.uniform(-1,1)*math.ceil(y-x)",
"f1": "random.uniform(-1,1)*math.ceil(y)-random.uniform(-1,1)*y**2+random.uniform(-1,1)*abs(y-x)",
"plot": {
"color": "snow",
"bgcolor": "black",
"projection": "polar",
"spot_size": 0.01
}
}
```
### Command Line Interface (CLI)
You can easily create art directly from the command line with Samila CLI. Here's an example command to get started:
```bash
samila --color=red --bgcolor=black --rotation=30 --projection=polar --mode f2_vs_f1 --save-image test.png
```
In this example:
- `--color=red`: Sets the primary color of the art.
- `--bgcolor=black`: Sets the background color.
- `--rotation=30`: Rotates the artwork by 30 degrees.
- `--projection=polar`: Use polar projection for plotting.
- `--mode=f2_vs_f1`: Sets the generation mode
- `--save-image=test.png`: Saves the generated image as test.png.
For more options and detailed usage, run the following command to access help:
```bash
samila --help
```
This will provide additional information on all available parameters and how to customize your artwork further.
## Mathematical details
Samila is simply a transformation between a square-shaped space from the Cartesian coordinate system to any arbitrary coordination like [Polar coordinate system](https://en.wikipedia.org/wiki/Polar_coordinate_system).
### Example
<img src="https://github.com/sepandhaghighi/samila/raw/master/otherfiles/mathematical_details/transformation.png">
We have set of points in the first space (left square) which can be defined as follow:
<img src="https://github.com/sepandhaghighi/samila/raw/master/otherfiles/mathematical_details/S1.jpg">
And below functions are used for transformation:
```pycon
>>> def f1(x, y):
result = random.uniform(-1,1) * x**2 - math.sin(y**2) + abs(y-x)
return result
>>> def f2(x, y):
result = random.uniform(-1,1) * y**3 - math.cos(x**2) + 2*x
return result
```
<img src="https://github.com/sepandhaghighi/samila/raw/master/otherfiles/mathematical_details/S2.jpg">
here we use `Projection.POLAR` so later space will be the polar space and we have:
```pycon
>>> g = GenerativeImage(f1, f2)
>>> g.generate(seed=10)
>>> g.plot(projection=Projection.POLAR)
```
<img src="https://github.com/sepandhaghighi/samila/raw/master/otherfiles/mathematical_details/S2_.jpg">
<img src="https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/6.png">
## Try Samila in your browser!
Samila can be used online in interactive Jupyter Notebooks via the Binder or Colab services!
Try it out now!
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/sepandhaghighi/samila/master)
[![Google Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/sepandhaghighi/samila/blob/master)
ℹ️ Check `examples` folder
## Issues & bug reports
Just fill an issue and describe it. We'll check it ASAP! or send an email to [info@samila.site](mailto:info@samila.site "info@samila.site").
- Please complete the issue template
You can also join our discord server
<a href="https://discord.com/invite/94bz5QGZWb">
<img src="https://img.shields.io/discord/900055829225562162.svg?style=for-the-badge" alt="Discord Channel">
</a>
## Social media
1. [Instagram](https://www.instagram.com/samila_arts)
2. [Telegram](https://t.me/samila_arts)
3. [Twitter](https://twitter.com/samila_arts)
4. [Discord](https://discord.com/invite/94bz5QGZWb)
## References
<blockquote>1- Schönlieb, Carola-Bibiane, and Franz Schubert. "Random simulations for generative art construction–some examples." Journal of Mathematics and the Arts 7.1 (2013): 29-39.</blockquote>
<blockquote>2- <a href="https://github.com/cutterkom/generativeart">Create Generative Art with R</a></blockquote>
<blockquote>3- <a href="https://nft.storage/">NFT.storage : Free decentralized storage and bandwidth for NFTs</a></blockquote>
## Acknowledgments
This project was funded through the **Next Step Microgrant**, a program established by [Protocol Labs](https://protocol.ai/).
## Show your support
<h3>Star this repo</h3>
Give a ⭐️ if this project helped you!
<h3>Donate to our project</h3>
If you do like our project and we hope that you do, can you please support us? Our project is not and is never going to be working for profit. We need the money just so we can continue doing what we do ;-) .
<a href="http://www.samila.site/donate.html" target="_blank"><img src="https://github.com/sepandhaghighi/samila/raw/master/otherfiles/donate-button.png" height="90px" width="270px" alt="Samila Donation"></a>
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [1.4] - 2024-11-20
### Added
- Command Line Interface (CLI)
### Changed
- GitHub actions are limited to the `dev` and `master` branches
- Test system modified
- `Python 3.13` added to `test.yml`
## [1.3] - 2024-09-09
### Added
- `deprecated` function
- 14 new generation modes
1. `F1_VS_F2`
2. `F2_VS_F1`
3. `F1_VS_INDEX`
4. `F2_VS_INDEX`
5. `INDEX_VS_F1`
6. `INDEX_VS_F2`
7. `F1_VS_X1`
8. `F2_VS_X1`
9. `F1_VS_X2`
10. `F2_VS_X2`
11. `X1_VS_F1`
12. `X1_VS_F2`
13. `X2_VS_F1`
14. `X2_VS_F2`
- `bulk.ipynb` notebook
### Changed
- `mode` parameter added to `generate` method
- `README.md` updated
- `demo.ipynb` updated
## [1.2] - 2024-06-25
### Added
- `feature_request.yml` template
- `config.yml` for issue template
- `get_cmap` function
- `Gateway` enum
- `SECURITY.md`
### Changed
- Bug report template modified
- `func_seed` parameter added to GenerativeImage `__init__`
- Minor edits in `functions.py`
- `DEFAULT_CMAP` renamed to `DEFAULT_CMAP_NAME`
- `pillow` added to conda dependencies
- `codecov` removed from `dev-requirements.txt`
- `gateway` parameter added to `nft_storage` method
- Test system modified
- Random mode modified
- `README.md` updated
- `Python 3.5` support dropped
- `Python 3.12` added to `test.yml`
## [1.1] - 2023-04-05
### Added
- `__version__` attribute
- `python_version` attribute
- `get_python_version` function
- `RANDOM_EQUATION_MIN_COMPLEXITY` parameter
- `RANDOM_EQUATION_FOF_MAX_DEPTH` parameter
- `RANDOM_EQUATION_FOF_MIN_DEPTH` parameter
- `rotate` function
### Changed
- `rotation` parameter added to `plot` method
- `timeout` parameter added to `nft_storage` method
- `load_config` function modified
- `nft_storage_upload` function modified
- Random mode modified
- `RANDOM_EQUATION_GEN_COMPLEXITY` parameter renamed to `RANDOM_EQUATION_MAX_COMPLEXITY`
- `README.md` updated
## [1.0] - 2022-12-14
### Added
- `Marker` enum
- `get_data` function
- `get_config` function
### Changed
- `marker` parameter added to `plot` method
- `upload_data` parameter added to `nft_storage` method
- `upload_config` parameter added to `nft_storage` method
- `generate` method optimized
- Test system modified
- `README.md` updated
- `Python 3.11` added to `test.yml`
- `plot` method warning bug fixed
- Random mode modified
### Removed
- `fill_data` function
## [0.9] - 2022-09-28
### Added
- Anaconda workflow
### Changed
- `README.md` updated
- `CODE_OF_CONDUCT.md` updated
- `demo.ipynb` updated
- `cmap` parameter added to `plot` method
- Random mode modified
- Test system modified
- `generate` method optimized
- `samila_help` function updated
- `load_data` and `load_config` functions error handling updated
## [0.8] - 2022-06-01
### Added
- `INVALID_COLOR_TYPE_ERROR` error
- `COLOR_NOT_FOUND_WARNING` warning
- `BOTH_COLOR_COMPLEMENT_WARNING` warning
- `set_background` function
- `is_valid_color` function
- `color_complement` function
- `select_color` function
### Changed
- Transparent mode support for `bgcolor` parameter
- Random mode modified
- Complementary color support for `color` and `bgcolor` parameters
- `filter_color` function modified
## [0.7] - 2022-05-04
### Added
- `fill_data` function
- `random_hex_color_gen` function
- `color`,`bgcolor` and `projection` parameters random mode
### Changed
- Calculation warning added to `generate` method
- Hex color support for `color` and `bgcolor` parameters
- Test system modified
- Random mode modified
- `filter_color` function modified
- `filter_projection` function modified
- `is_same_data` function modified
- `README.md` updated
## [0.6] - 2022-04-13
### Added
- `save_params_filter` function
### Changed
- `__del__` method updated
- `message` field changed in `save_fig_file` function
- `message` field changed in `save_config_file` function
- `message` field changed in `save_data_file` function
- `message` field changed in `nft_storage_upload` function
- `depth` section added to config/data file
- `linewidth` parameter added to `plot` method
- `linewidth` parameter added to `plot_params_filter` function
- Random mode modified
- `README.md` updated
## [0.5] - 2022-03-21
### Added
- `__del__` method
- Demo notebook
### Changed
- `depth` parameter added to `nft_storage` method
- `depth` parameter added to `save_fig_buf` function
- `alpha` parameter added to `plot` method
- `alpha` parameter added to `plot_params_filter` function
- Random mode modified
- `README.md` updated
## [0.4] - 2022-01-13
### Added
- `PLOT_DATA_ERROR` error message
- `_GI_initializer` function
- `generate_params_filter` function
- `plot_params_filter` function
- `filter_size` function
- `save_config` method
- `load_config` function
- `save_config_file` function
- `samilaConfigError` class
- `samilaPlotError` class
- `filter_float` function
- Random equations mode
- `function1_str` attribute
- `function2_str` attribute
### Changed
- `README.md` updated
- `plot` section added to data file
- `edgecolor` changed to `c` in `plot` method
- `config` parameter added to GenerativeImage `__init__`
- `filter_projection` function edited
- Test system updated
### Removed
- `NO_FUNCTION_ERROR` error message
- `DATA_PARSING_ERROR` error message
- `JUST_DATA_WARNING` warning message
## [0.3] - 2021-11-10
### Added
- Discord channel
- `load_data` function
- `save_data_file` function
- `save_data` method
### Changed
- `data` parameter added to GenerativeImage `__init__` method
- `depth` parameter added to `save_image` method
- `depth` parameter added to `save_fig_file` function
- `save_image` and `nft_storage` methods background bug fixed
- `README.md` updated
- Test system updated
- `Python 3.10` added to `test.yml`
## [0.2] - 2021-10-14
### Added
- `dependabot.yml`
- `requirements-splitter.py`
- `samila_help` function
- `test.py`
- `function_test.py`
- `overall_test.py`
- `nft_upload_test.py`
- `is_same_data` function
- `save_image` method
### Changed
- `dev-requirements.txt` updated
- `README.md` updated
- `__main__.py` updated
- Test system updated
- `nft_storage` method updated
## [0.1] - 2021-09-30
### Added
- `GenerativeImage` class
- `plot` method
- `generate` method
- `nft_storage` method
[Unreleased]: https://github.com/sepandhaghighi/samila/compare/v1.4...dev
[1.4]: https://github.com/sepandhaghighi/samila/compare/v1.3...v1.4
[1.3]: https://github.com/sepandhaghighi/samila/compare/v1.2...v1.3
[1.2]: https://github.com/sepandhaghighi/samila/compare/v1.1...v1.2
[1.1]: https://github.com/sepandhaghighi/samila/compare/v1.0...v1.1
[1.0]: https://github.com/sepandhaghighi/samila/compare/v0.9...v1.0
[0.9]: https://github.com/sepandhaghighi/samila/compare/v0.8...v0.9
[0.8]: https://github.com/sepandhaghighi/samila/compare/v0.7...v0.8
[0.7]: https://github.com/sepandhaghighi/samila/compare/v0.6...v0.7
[0.6]: https://github.com/sepandhaghighi/samila/compare/v0.5...v0.6
[0.5]: https://github.com/sepandhaghighi/samila/compare/v0.4...v0.5
[0.4]: https://github.com/sepandhaghighi/samila/compare/v0.3...v0.4
[0.3]: https://github.com/sepandhaghighi/samila/compare/v0.2...v0.3
[0.2]: https://github.com/sepandhaghighi/samila/compare/v0.1...v0.2
[0.1]: https://github.com/sepandhaghighi/samila/compare/1058677...v0.1
Raw data
{
"_id": null,
"home_page": "https://www.samila.site",
"name": "samila",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "generative generative-art art nft file",
"author": "Samila Development Team",
"author_email": "info@samila.site",
"download_url": "https://files.pythonhosted.org/packages/b5/3e/9e415c3b4d9a43a95d3dd6a322686041a509d2d885956df11a4ead00e6a1/samila-1.4.tar.gz",
"platform": null,
"description": "\n<div align=\"center\">\n\t<img src=\"https://github.com/sepandhaghighi/samila/raw/master/otherfiles/logo.png\" width=400 height=400>\n\t<br/>\n\t<h1>Samila</h1>\n\t<br/>\n\t<a href=\"https://www.python.org/\"><img src=\"https://img.shields.io/badge/built%20with-Python3-green.svg\" alt=\"built with Python3\"></a>\n\t<a href=\"https://codecov.io/gh/sepandhaghighi/samila\"><img src=\"https://codecov.io/gh/sepandhaghighi/samila/branch/master/graph/badge.svg\"></a>\n\t<a href=\"https://badge.fury.io/py/samila\"><img src=\"https://badge.fury.io/py/samila.svg\" alt=\"PyPI version\" height=\"18\"></a>\n\t<a href=\"https://anaconda.org/sepandhaghighi/samila\"><img src=\"https://anaconda.org/sepandhaghighi/samila/badges/version.svg\"></a>\n\t<a href=\"https://colab.research.google.com/github/sepandhaghighi/samila/blob/master\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Samila-Colab\"></a>\n\t<a href=\"https://discord.com/invite/94bz5QGZWb\"><img src=\"https://img.shields.io/discord/900055829225562162.svg\" alt=\"Discord Channel\"></a>\n</div>\n\n\n## Overview\n\n<p align=\"justify\">\t\nSamila is a generative art generator written in Python, Samila lets you create images based on many thousand points. The position of every single point is calculated by a formula, which has random parameters. Because of the random numbers, every image looks different.\n</p>\n\n\n<table>\n\t<tr> \n\t\t<td align=\"center\">Open Hub</td>\n\t\t<td align=\"center\"><a href=\"https://www.openhub.net/p/samila\"><img src=\"https://www.openhub.net/p/samila/widgets/project_thin_badge.gif\"></a></td>\t\n\t</tr>\n\t<tr>\n\t\t<td align=\"center\">PyPI Counter</td>\n\t\t<td align=\"center\"><a href=\"http://pepy.tech/project/samila\"><img src=\"http://pepy.tech/badge/samila\"></a></td>\n\t</tr>\n\t<tr>\n\t\t<td align=\"center\">Github Stars</td>\n\t\t<td align=\"center\"><a href=\"https://github.com/sepandhaghighi/samila\"><img src=\"https://img.shields.io/github/stars/sepandhaghighi/samila.svg?style=social&label=Stars\"></a></td>\n\t</tr>\n</table>\n\n\n\n<table>\n\t<tr> \n\t\t<td align=\"center\">Branch</td>\n\t\t<td align=\"center\">master</td>\t\n\t\t<td align=\"center\">dev</td>\t\n\t</tr>\n <tr>\n\t\t<td align=\"center\">CI</td>\n\t\t<td align=\"center\"><img src=\"https://github.com/sepandhaghighi/samila/actions/workflows/test.yml/badge.svg?branch=master\"></td>\n\t\t<td align=\"center\"><img src=\"https://github.com/sepandhaghighi/samila/actions/workflows/test.yml/badge.svg?branch=dev\"></td>\n\t</tr>\n</table>\n\n\n<table>\n\t<tr> \n\t\t<td align=\"center\">Code Quality</td>\n\t\t<td><a href=\"https://www.codacy.com/gh/sepandhaghighi/samila/dashboard?utm_source=github.com&utm_medium=referral&utm_content=sepandhaghighi/samila&utm_campaign=Badge_Grade\"><img src=\"https://app.codacy.com/project/badge/Grade/14df8ed5f8434aaea85889555b0182a9\"/></a></td>\n\t\t<td><a href=\"https://codebeat.co/projects/github-com-sepandhaghighi-samila-dev\"><img alt=\"codebeat badge\" src=\"https://codebeat.co/badges/01e6aa48-4cc2-4d9c-8288-c9fb490ad371\" /></a></td>\n\t\t<td><a href=\"https://www.codefactor.io/repository/github/sepandhaghighi/samila\"><img src=\"https://www.codefactor.io/repository/github/sepandhaghighi/samila/badge\" alt=\"CodeFactor\" /></a></td>\n\t</tr>\n</table>\n\n\n\n## Installation\t\t\n\n### PyPI\n- Check [Python Packaging User Guide](https://packaging.python.org/installing/) \n- Run `pip install samila==1.4`\n\n### Source code\n- Download [Version 1.4](https://github.com/sepandhaghighi/samila/archive/v1.4.zip) or [Latest Source](https://github.com/sepandhaghighi/samila/archive/dev.zip)\n- Run `pip install .`\n\n### Conda\n- Check [Conda Managing Package](https://conda.io)\n- `conda install -c sepandhaghighi samila`\n\n\n## Usage\n\n### Magic\n```pycon\n>>> import matplotlib.pyplot as plt\n>>> from samila import GenerativeImage\n>>> g = GenerativeImage()\n>>> g.generate()\n>>> g.plot()\n>>> plt.show()\n```\n<img src=\"https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/7.png\">\t\n\n\u2139\ufe0f You can change function generation seed by `func_seed` parameter in `GenerativeImage`\n\n### Basic\n```pycon\n>>> import random\n>>> import math\n>>> def f1(x, y):\n result = random.uniform(-1,1) * x**2 - math.sin(y**2) + abs(y-x)\n return result\n>>> def f2(x, y):\n result = random.uniform(-1,1) * y**3 - math.cos(x**2) + 2*x\n return result\n>>> g = GenerativeImage(f1, f2)\n>>> g.generate()\n>>> g.plot()\n>>> g.seed\n188781\n>>> plt.show()\n```\n<img src=\"https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/1.png\">\t\n\n### Generation mode\n```pycon\n>>> from samila import GenerateMode\n>>> g = GenerativeImage(f1, f2)\n>>> g.generate(mode=GenerateMode.F1_VS_INDEX)\n>>> g.plot()\n>>> g.seed\n883114\n>>> plt.show()\n```\n<img src=\"https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/10.png\">\t\n\n\u2139\ufe0f Supported modes : `F1_VS_F2`, `F2_VS_F1`, `F1_VS_INDEX`, `F2_VS_INDEX`, `INDEX_VS_F1`, `INDEX_VS_F2`, `F1_VS_X1`, `F1_VS_X2`, `F2_VS_X1`, `F2_VS_X2`, `X1_VS_F1`, `X1_VS_F2`, `X2_VS_F1` and `X2_VS_F2`\n\n\u2139\ufe0f Default mode is `F1_VS_F2`\n\n### Projection\n```pycon\n>>> from samila import Projection\n>>> g = GenerativeImage(f1, f2)\n>>> g.generate()\n>>> g.plot(projection=Projection.POLAR)\n>>> g.seed\n829730\n>>> plt.show()\n```\n<img src=\"https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/2.png\">\t\n\n\u2139\ufe0f Supported projections : `RECTILINEAR`, `POLAR`, `AITOFF`, `HAMMER`, `LAMBERT`, `MOLLWEIDE` and `RANDOM`\n\n\u2139\ufe0f Default projection is `RECTILINEAR`\n\n### Marker\n```pycon\n>>> from samila import Marker\n>>> g = GenerativeImage(f1, f2)\n>>> g.generate()\n>>> g.plot(marker=Marker.CIRCLE, spot_size=10)\n>>> g.seed\n448742\n>>> plt.show()\n```\n<img src=\"https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/9.png\">\t\n\n\u2139\ufe0f Supported markers : `POINT`, `PIXEL`, `CIRCLE`, `TRIANGLE_DOWN`, `TRIANGLE_UP`, `TRIANGLE_LEFT`, `TRIANGLE_RIGHT`, `TRI_DOWN`, `TRI_UP`, `TRI_LEFT`, `TRI_RIGHT`, `OCTAGON`, `SQUARE`, `PENTAGON`, `PLUS`, `PLUS_FILLED`, `STAR`, `HEXAGON_VERTICAL`, `HEXAGON_HORIZONTAL`, `X`, `X_FILLED`, `DIAMOND`, `DIAMON_THIN`, `VLINE`, `HLINE` and `RANDOM`\n\n\u2139\ufe0f Default marker is `POINT`\n\n### Rotation\nYou can even rotate your art by using `rotation` parameter. Enter your desired rotation for the image in degrees and you will have it.\n\n```pycon\n>>> g = GenerativeImage(f1, f2)\n>>> g.generate()\n>>> g.plot(rotation=45)\n```\n\n\u2139\ufe0f Default rotation is `0`\n\n### Range\n```pycon\n>>> g = GenerativeImage(f1, f2)\n>>> g.generate(start=-2*math.pi, step=0.01, stop=0)\n>>> g.plot()\n>>> g.seed\n234752\n>>> plt.show()\n```\n<img src=\"https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/3.png\">\t\n\n\u2139\ufe0f Default range is $(-\\pi, \\pi)$\n\n### Color\n```pycon\n>>> g = GenerativeImage(f1, f2)\n>>> g.generate()\n>>> g.plot(color=\"yellow\", bgcolor=\"black\", projection=Projection.POLAR)\n>>> g.seed\n1018273\n>>> plt.show()\n```\n<img src=\"https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/4.png\">\t\n\n\u2139\ufe0f Default color is `black`\n\n\u2139\ufe0f Default background-color is `white`\n\n\u2139\ufe0f Supported colors are available in `VALID_COLORS` list\n\n\u2139\ufe0f `color` and `bgcolor` parameters supported formats:\n\n1. Color name (example: `color=\"yellow\"`)\n2. RGB/RGBA (example: `color=(0.1,0.1,0.1)`, `color=(0.1,0.1,0.1,0.1)`)\n3. Hex (example: `color=\"#eeefff\"`)\n4. Random (example: `color=\"random\"`)\n5. Complement (example: `color=\"complement\", bgcolor=\"blue\"`)\n6. Transparent (example: `bgcolor=\"transparent\"`)\n7. List (example: `color=[\"black\", \"#fffeef\",...]`)\n\n\u26a0\ufe0f **Transparent** mode is only available for background\n\n\u26a0\ufe0f **List** mode is only available for color\n\n\u26a0\ufe0f In **List** mode, the length of this list must be equal to the lengths of data1 and data2\n\n#### Point color\nYou can make your custom color map and use it in Samila.\n\n```pycon\n>>> colorarray = [\n... [0.7, 0.2, 0.2, 1],\n... [0.6, 0.3, 0.2, 1],\n... \"black\",\n... [0.4, 0.4, 0.3, 1],\n... [0.3, 0.4, 0.4, 1],\n... \"#ff2561\"]\n>>> g.generate()\n>>> g.seed\n454893\n>>> g.plot(cmap=colorarray, color=g.data2, projection=Projection.POLAR)\n>>> plt.show()\n```\n<img src=\"https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/8.png\">\t\n\n\n### Regeneration\n```pycon\n>>> g = GenerativeImage(f1, f2)\n>>> g.generate(seed=1018273)\n>>> g.plot(projection=Projection.POLAR)\n>>> plt.show()\n```\n<img src=\"https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/5.png\">\t\n\n### NFT.storage\nUpload generated image directly to [NFT.storage](https://NFT.storage)\n\n```pycon\n>>> g.nft_storage(api_key=\"YOUR_API_KEY\", timeout=5000)\n{'status': True, 'message': 'FILE_LINK'}\n```\n\nYou can also upload your config/data to nft storage as follows:\n```pycon\n>>> g.nft_storage(api_key=\"API_KEY\", upload_config=True)\n{'status': {'image': True, 'config':True}, 'message': {'image':'IMAGE_FILE_LINK', 'config':'CONFIG_FILE_LINK'}\n```\nor\n```pycon\n>>> g.nft_storage(api_key=\"API_KEY\", upload_data=True)\n{'status': {'image': True, 'data':True}, 'message': {'image':'IMAGE_FILE_LINK', 'data':'DATA_FILE_LINK'}\n```\n\nYou have the option to choose a specific IPFS gateway:\n```pycon\n>>> from samila import Gateway\n>>> g.nft_storage(api_key=\"API_KEY\", upload_data=True, gateway=Gateway.DWEB)\n{'status': {'image': True, 'data':True}, 'message': {'image':'IMAGE_FILE_LINK', 'data':'DATA_FILE_LINK'}\n```\n\n\n\u26a0\ufe0f This method is deprecated and may be removed in future releases\n\n\u2139\ufe0f Default timeout is `3000` seconds\n\n\u2139\ufe0f Default gateway is `IPFS_IO`\n\n### Save image\nSave generated image.\n\n```pycon\n>>> g.save_image(file_adr=\"test.png\")\n{'status': True, 'message': 'FILE_PATH'}\n```\nSave generated image in higher resolutions.\n\n```pycon\n>>> g.save_image(file_adr=\"test.png\", depth=5)\n{'status': True, 'message': 'FILE_PATH'}\n```\n\n### Save data\nSave generated image data.\n\n```pycon\n>>> g.save_data(file_adr=\"data.json\")\n{'status': True, 'message': 'FILE_PATH'}\n```\nSo you can load it into a `GenerativeImage` instance later by\n\n```pycon\n>>> g = GenerativeImage(data=open('data.json', 'r'))\n```\n\nData structure:\n```JSON\n{\n \"plot\": {\n \"projection\": \"polar\",\n \"bgcolor\": \"black\",\n \"color\": \"snow\",\n \"spot_size\": 0.01\n },\n \"matplotlib_version\": \"3.0.3\",\n \"data1\": [\n 0.3886741692042526,\n 22.57390286376703,\n -0.1646310981668766,\n 66.23632344600155\n ],\n \"data2\": [\n -0.14588750183600108,\n 20.197945942677833,\n 0.5485453260942901,\n -589.3284610518896\n ]\n}\n```\n\n### Save config\nSave generated image config. It contains string formats of functions which is also human readable.\n\n```pycon\n>>> g.save_config(file_adr=\"config.json\")\n{'status': True, 'message': 'FILE_PATH'}\n```\nSo you can load it into a `GenerativeImage` instance later by\n\n```pycon\n>>> g = GenerativeImage(config=open('config.json', 'r'))\n```\n\nConfig structure:\n\n```JSON\n{\n \"matplotlib_version\": \"3.0.3\",\n \"generate\": {\n \"seed\": 379184,\n \"stop\": 3.141592653589793,\n \"step\": 0.01,\n \"start\": -3.141592653589793\n },\n \"f2\": \"random.uniform(-1,1)*math.cos(x*(y**3))+random.uniform(-1,1)*math.ceil(y-x)\",\n \"f1\": \"random.uniform(-1,1)*math.ceil(y)-random.uniform(-1,1)*y**2+random.uniform(-1,1)*abs(y-x)\",\n \"plot\": {\n \"color\": \"snow\",\n \"bgcolor\": \"black\",\n \"projection\": \"polar\",\n \"spot_size\": 0.01\n }\n}\n```\n\n### Command Line Interface (CLI)\nYou can easily create art directly from the command line with Samila CLI. Here's an example command to get started:\n```bash\nsamila --color=red --bgcolor=black --rotation=30 --projection=polar --mode f2_vs_f1 --save-image test.png\n```\n\nIn this example:\n- `--color=red`: Sets the primary color of the art.\n- `--bgcolor=black`: Sets the background color.\n- `--rotation=30`: Rotates the artwork by 30 degrees.\n- `--projection=polar`: Use polar projection for plotting.\n- `--mode=f2_vs_f1`: Sets the generation mode\n- `--save-image=test.png`: Saves the generated image as test.png.\n\nFor more options and detailed usage, run the following command to access help:\n```bash\nsamila --help\n```\nThis will provide additional information on all available parameters and how to customize your artwork further.\n\n## Mathematical details\nSamila is simply a transformation between a square-shaped space from the Cartesian coordinate system to any arbitrary coordination like [Polar coordinate system](https://en.wikipedia.org/wiki/Polar_coordinate_system).\n\n### Example\n<img src=\"https://github.com/sepandhaghighi/samila/raw/master/otherfiles/mathematical_details/transformation.png\">\n\nWe have set of points in the first space (left square) which can be defined as follow:\n\n<img src=\"https://github.com/sepandhaghighi/samila/raw/master/otherfiles/mathematical_details/S1.jpg\">\n\nAnd below functions are used for transformation:\n\n```pycon\n>>> def f1(x, y):\n result = random.uniform(-1,1) * x**2 - math.sin(y**2) + abs(y-x)\n return result\n>>> def f2(x, y):\n result = random.uniform(-1,1) * y**3 - math.cos(x**2) + 2*x\n return result\n```\n\n<img src=\"https://github.com/sepandhaghighi/samila/raw/master/otherfiles/mathematical_details/S2.jpg\">\n\nhere we use `Projection.POLAR` so later space will be the polar space and we have:\n\n```pycon\n>>> g = GenerativeImage(f1, f2)\n>>> g.generate(seed=10)\n>>> g.plot(projection=Projection.POLAR)\n```\n<img src=\"https://github.com/sepandhaghighi/samila/raw/master/otherfiles/mathematical_details/S2_.jpg\">\n\n<img src=\"https://github.com/sepandhaghighi/samila/raw/master/otherfiles/images/6.png\">\n\n## Try Samila in your browser!\nSamila can be used online in interactive Jupyter Notebooks via the Binder or Colab services!\n\nTry it out now!\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/sepandhaghighi/samila/master)\n\n[![Google Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/sepandhaghighi/samila/blob/master)\n\n\u2139\ufe0f Check `examples` folder \n\n## Issues & bug reports\t\t\t\n\nJust fill an issue and describe it. We'll check it ASAP! or send an email to [info@samila.site](mailto:info@samila.site \"info@samila.site\"). \n\n- Please complete the issue template\n \nYou can also join our discord server\n\n<a href=\"https://discord.com/invite/94bz5QGZWb\">\n <img src=\"https://img.shields.io/discord/900055829225562162.svg?style=for-the-badge\" alt=\"Discord Channel\">\n</a>\n\n\n## Social media\n\n1. [Instagram](https://www.instagram.com/samila_arts)\n2. [Telegram](https://t.me/samila_arts)\n3. [Twitter](https://twitter.com/samila_arts)\n4. [Discord](https://discord.com/invite/94bz5QGZWb)\n\n\n## References\t\t\t\n\n<blockquote>1- Sch\u00f6nlieb, Carola-Bibiane, and Franz Schubert. \"Random simulations for generative art construction\u2013some examples.\" Journal of Mathematics and the Arts 7.1 (2013): 29-39.</blockquote>\n\n<blockquote>2- <a href=\"https://github.com/cutterkom/generativeart\">Create Generative Art with R</a></blockquote>\n\n<blockquote>3- <a href=\"https://nft.storage/\">NFT.storage : Free decentralized storage and bandwidth for NFTs</a></blockquote>\n\n## Acknowledgments\n\nThis project was funded through the **Next Step Microgrant**, a program established by [Protocol Labs](https://protocol.ai/).\n\n## Show your support\n\t\t\t\t\t\t\t\t\n<h3>Star this repo</h3>\t\t\t\t\t\n\nGive a \u2b50\ufe0f if this project helped you!\n\n<h3>Donate to our project</h3>\t\n\nIf you do like our project and we hope that you do, can you please support us? Our project is not and is never going to be working for profit. We need the money just so we can continue doing what we do ;-) .\t\t\t\n\n<a href=\"http://www.samila.site/donate.html\" target=\"_blank\"><img src=\"https://github.com/sepandhaghighi/samila/raw/master/otherfiles/donate-button.png\" height=\"90px\" width=\"270px\" alt=\"Samila Donation\"></a>\n\n\n\n\n# Changelog\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)\nand this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).\n\n## [Unreleased]\n## [1.4] - 2024-11-20\n### Added\n- Command Line Interface (CLI)\n### Changed\n- GitHub actions are limited to the `dev` and `master` branches\n- Test system modified\n- `Python 3.13` added to `test.yml`\n## [1.3] - 2024-09-09\n### Added\n- `deprecated` function\n- 14 new generation modes\n\t1. `F1_VS_F2`\n\t2. `F2_VS_F1`\n\t3. `F1_VS_INDEX`\n\t4. `F2_VS_INDEX`\n\t5. `INDEX_VS_F1`\n\t6. `INDEX_VS_F2`\n\t7. `F1_VS_X1`\n\t8. `F2_VS_X1`\n\t9. `F1_VS_X2`\n\t10. `F2_VS_X2`\n\t11. `X1_VS_F1`\n\t12. `X1_VS_F2`\n\t13. `X2_VS_F1`\n\t14. `X2_VS_F2`\n- `bulk.ipynb` notebook\n### Changed\n- `mode` parameter added to `generate` method\n- `README.md` updated\n- `demo.ipynb` updated\n## [1.2] - 2024-06-25\n### Added\n- `feature_request.yml` template\n- `config.yml` for issue template\n- `get_cmap` function\n- `Gateway` enum\n- `SECURITY.md`\n### Changed\n- Bug report template modified\n- `func_seed` parameter added to GenerativeImage `__init__`\n- Minor edits in `functions.py`\n- `DEFAULT_CMAP` renamed to `DEFAULT_CMAP_NAME`\n- `pillow` added to conda dependencies\n- `codecov` removed from `dev-requirements.txt`\n- `gateway` parameter added to `nft_storage` method\n- Test system modified\n- Random mode modified\n- `README.md` updated\n- `Python 3.5` support dropped\n- `Python 3.12` added to `test.yml`\n## [1.1] - 2023-04-05\n### Added\n- `__version__` attribute\n- `python_version` attribute\n- `get_python_version` function\n- `RANDOM_EQUATION_MIN_COMPLEXITY` parameter\n- `RANDOM_EQUATION_FOF_MAX_DEPTH` parameter\n- `RANDOM_EQUATION_FOF_MIN_DEPTH` parameter\n- `rotate` function\n### Changed\n- `rotation` parameter added to `plot` method\n- `timeout` parameter added to `nft_storage` method\n- `load_config` function modified\n- `nft_storage_upload` function modified\n- Random mode modified\n- `RANDOM_EQUATION_GEN_COMPLEXITY` parameter renamed to `RANDOM_EQUATION_MAX_COMPLEXITY`\n- `README.md` updated\n## [1.0] - 2022-12-14\n### Added\n- `Marker` enum\n- `get_data` function\n- `get_config` function\n### Changed\n- `marker` parameter added to `plot` method\n- `upload_data` parameter added to `nft_storage` method\n- `upload_config` parameter added to `nft_storage` method\n- `generate` method optimized\n- Test system modified\n- `README.md` updated\n- `Python 3.11` added to `test.yml`\n- `plot` method warning bug fixed\n- Random mode modified\n### Removed\n- `fill_data` function\n## [0.9] - 2022-09-28\n### Added\n- Anaconda workflow\n### Changed\n- `README.md` updated\n- `CODE_OF_CONDUCT.md` updated\n- `demo.ipynb` updated\n- `cmap` parameter added to `plot` method\n- Random mode modified\n- Test system modified\n- `generate` method optimized\n- `samila_help` function updated\n- `load_data` and `load_config` functions error handling updated\n## [0.8] - 2022-06-01\n### Added\n- `INVALID_COLOR_TYPE_ERROR` error\n- `COLOR_NOT_FOUND_WARNING` warning\n- `BOTH_COLOR_COMPLEMENT_WARNING` warning\n- `set_background` function\n- `is_valid_color` function\n- `color_complement` function\n- `select_color` function\n### Changed\n- Transparent mode support for `bgcolor` parameter\n- Random mode modified\n- Complementary color support for `color` and `bgcolor` parameters\n- `filter_color` function modified\n## [0.7] - 2022-05-04\n### Added\n- `fill_data` function\n- `random_hex_color_gen` function\n- `color`,`bgcolor` and `projection` parameters random mode\n### Changed\n- Calculation warning added to `generate` method\n- Hex color support for `color` and `bgcolor` parameters\n- Test system modified\n- Random mode modified\n- `filter_color` function modified\n- `filter_projection` function modified\n- `is_same_data` function modified\n- `README.md` updated\n## [0.6] - 2022-04-13\n### Added\n- `save_params_filter` function\n### Changed\n- `__del__` method updated\n- `message` field changed in `save_fig_file` function\n- `message` field changed in `save_config_file` function\n- `message` field changed in `save_data_file` function\n- `message` field changed in `nft_storage_upload` function\n- `depth` section added to config/data file\n- `linewidth` parameter added to `plot` method\n- `linewidth` parameter added to `plot_params_filter` function\n- Random mode modified\n- `README.md` updated\n## [0.5] - 2022-03-21\n### Added\n- `__del__` method\n- Demo notebook\n### Changed\n- `depth` parameter added to `nft_storage` method\n- `depth` parameter added to `save_fig_buf` function\n- `alpha` parameter added to `plot` method\n- `alpha` parameter added to `plot_params_filter` function\n- Random mode modified\n- `README.md` updated\n## [0.4] - 2022-01-13\n### Added\n- `PLOT_DATA_ERROR` error message\n- `_GI_initializer` function\n- `generate_params_filter` function\n- `plot_params_filter` function\n- `filter_size` function\n- `save_config` method\n- `load_config` function\n- `save_config_file` function\n- `samilaConfigError` class\n- `samilaPlotError` class\n- `filter_float` function\n- Random equations mode\n- `function1_str` attribute\n- `function2_str` attribute\n### Changed\n- `README.md` updated\n- `plot` section added to data file\n- `edgecolor` changed to `c` in `plot` method\n- `config` parameter added to GenerativeImage `__init__`\n- `filter_projection` function edited\n- Test system updated\n### Removed\n- `NO_FUNCTION_ERROR` error message\n- `DATA_PARSING_ERROR` error message\n- `JUST_DATA_WARNING` warning message\n## [0.3] - 2021-11-10\n### Added\n- Discord channel\n- `load_data` function\n- `save_data_file` function\n- `save_data` method\n### Changed\n- `data` parameter added to GenerativeImage `__init__` method\n- `depth` parameter added to `save_image` method\n- `depth` parameter added to `save_fig_file` function\n- `save_image` and `nft_storage` methods background bug fixed\n- `README.md` updated\n- Test system updated\n- `Python 3.10` added to `test.yml`\n## [0.2] - 2021-10-14\n### Added\n- `dependabot.yml`\n- `requirements-splitter.py`\n- `samila_help` function\n- `test.py`\n- `function_test.py`\n- `overall_test.py`\n- `nft_upload_test.py`\n- `is_same_data` function\n- `save_image` method\n### Changed\n- `dev-requirements.txt` updated\n- `README.md` updated\n- `__main__.py` updated\n- Test system updated\n- `nft_storage` method updated\n## [0.1] - 2021-09-30\n### Added\n- `GenerativeImage` class\n- `plot` method\n- `generate` method\n- `nft_storage` method\n\n[Unreleased]: https://github.com/sepandhaghighi/samila/compare/v1.4...dev\n[1.4]: https://github.com/sepandhaghighi/samila/compare/v1.3...v1.4\n[1.3]: https://github.com/sepandhaghighi/samila/compare/v1.2...v1.3\n[1.2]: https://github.com/sepandhaghighi/samila/compare/v1.1...v1.2\n[1.1]: https://github.com/sepandhaghighi/samila/compare/v1.0...v1.1\n[1.0]: https://github.com/sepandhaghighi/samila/compare/v0.9...v1.0\n[0.9]: https://github.com/sepandhaghighi/samila/compare/v0.8...v0.9\n[0.8]: https://github.com/sepandhaghighi/samila/compare/v0.7...v0.8\n[0.7]: https://github.com/sepandhaghighi/samila/compare/v0.6...v0.7\n[0.6]: https://github.com/sepandhaghighi/samila/compare/v0.5...v0.6\n[0.5]: https://github.com/sepandhaghighi/samila/compare/v0.4...v0.5\n[0.4]: https://github.com/sepandhaghighi/samila/compare/v0.3...v0.4\n[0.3]: https://github.com/sepandhaghighi/samila/compare/v0.2...v0.3\n[0.2]: https://github.com/sepandhaghighi/samila/compare/v0.1...v0.2\n[0.1]: https://github.com/sepandhaghighi/samila/compare/1058677...v0.1\n\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Generative Art Generator",
"version": "1.4",
"project_urls": {
"Discord": "https://discord.com/invite/94bz5QGZWb",
"Download": "https://github.com/sepandhaghighi/samila/tarball/v1.4",
"Homepage": "https://www.samila.site",
"Source": "https://github.com/sepandhaghighi/samila",
"Tracker": "https://github.com/sepandhaghighi/samila/issues"
},
"split_keywords": [
"generative",
"generative-art",
"art",
"nft",
"file"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fc9a8820557444b95d6a03e4af00e17406fb6804510530f6f1b9c63b526285ce",
"md5": "b8fa01069d0436d8fe333cf6e3f1dd91",
"sha256": "92a214f02c877f0f92eaea3db22117525ecd902253df401755b4217b9dcdaa63"
},
"downloads": -1,
"filename": "samila-1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b8fa01069d0436d8fe333cf6e3f1dd91",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 24396,
"upload_time": "2024-11-20T14:54:50",
"upload_time_iso_8601": "2024-11-20T14:54:50.368963Z",
"url": "https://files.pythonhosted.org/packages/fc/9a/8820557444b95d6a03e4af00e17406fb6804510530f6f1b9c63b526285ce/samila-1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b53e9e415c3b4d9a43a95d3dd6a322686041a509d2d885956df11a4ead00e6a1",
"md5": "841fb8fe3a21a519e029312813f45cba",
"sha256": "6405b79e26b6a02d83646100441c7da8db46cba2d635b263ff2e871a4c5da789"
},
"downloads": -1,
"filename": "samila-1.4.tar.gz",
"has_sig": false,
"md5_digest": "841fb8fe3a21a519e029312813f45cba",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 29059,
"upload_time": "2024-11-20T14:54:48",
"upload_time_iso_8601": "2024-11-20T14:54:48.255521Z",
"url": "https://files.pythonhosted.org/packages/b5/3e/9e415c3b4d9a43a95d3dd6a322686041a509d2d885956df11a4ead00e6a1/samila-1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-20 14:54:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sepandhaghighi",
"github_project": "samila",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [
{
"name": "matplotlib",
"specs": [
[
">=",
"3.0.0"
]
]
},
{
"name": "requests",
"specs": [
[
">=",
"2.20.0"
]
]
},
{
"name": "art",
"specs": [
[
">=",
"1.8"
]
]
},
{
"name": "Pillow",
"specs": [
[
">=",
"6.2"
]
]
}
],
"lcname": "samila"
}