Generative ART
Project description
Table of contents
- Overview
- Installation
- Usage
- Issues & Bug Reports
- Dependencies
- Contribution
- References
- Authors
- License
- Show Your Support
- Changelog
- Code of Conduct
Overview
Samila is a generative art generator written in Python, Samila let's you create arts 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.
Open Hub | |
PyPI Counter | |
Github Stars |
Branch | master | dev |
CI |
Code Quality |
Installation
Source code
- Download Version 0.1 or Latest Source
- Run
pip install -r requirements.txt
orpip3 install -r requirements.txt
(Need root access) - Run
python3 setup.py install
orpython setup.py install
(Need root access)
PyPI
- Check Python Packaging User Guide
- Run
pip install samila==0.1
orpip3 install samila==0.1
(Need root access)
Easy install
- Run
easy_install --upgrade samila
(Need root access)
Usage
Basic
>>> import random
>>> import math
>>> import matplotlib.pyplot as plt
>>> from samila import GenerativeImage
>>> 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()
Projection
>>> from samila import Projection
>>> g = GenerativeImage(f1,f2)
>>> g.generate()
>>> g.plot(projection=Projection.POLAR)
>>> g.seed
829730
>>> plt.show()
- Supported projections :
RECTILINEAR
,POLAR
,AITOFF
,HAMMER
,LAMBERT
andMOLLWEIDE
- Default projection is
RECTILINEAR
Range
>>> g = GenerativeImage(f1,f2)
>>> g.generate(start = -2*math.pi,step=0.1,stop=0)
>>> g.plot()
>>> g.seed
234752
>>> plt.show()
Color
>>> g = GenerativeImage(f1,f2)
>>> g.generate()
>>> g.plot(color="yellow",bgcolor="black",projection=Projection.POLAR)
>>> g.seed
1018273
>>> plt.show()
- Supported colors are available in
VALID_COLORS
list color
andbgcolor
parameters support color name and RGB/RGBA formats
Regeneration
>>> g = GenerativeImage(f1,f2)
>>> g.generate(seed=1018273)
>>> g.plot(projection=Projection.POLAR)
>>> plt.show()
NFT.storage
Upload generated image directly to NFT.storage
>>> g.nft_storage(api_key = YOUR_API_KEY)
{'status': True, 'message': 'Everything seems good'}
Issues & bug reports
Just fill an issue and describe it. We'll check it ASAP! or send an email to info@4r7.ir.
- Please complete the issue template
Dependencies
master | dev |
References
1-
Show your support
Star this repo
Give a ⭐️ if this project helped you!
Donate to our project
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 ;-) .
Bitcoin
1KtNLEEeUbTEK9PdN6Ya3ZAKXaqoKUuxCyEthereum
0xcD4Db18B6664A9662123D4307B074aE968535388Litecoin
Ldnz5gMcEeV8BAdsyf8FstWDC6uyYR6pgZDoge
DDUnKpFQbBqLpFVZ9DfuVysBdr249HxVDhTron
TCZxzPZLcJHr2qR3uPUB1tXB6L3FDSSAx7Ripple
rN7ZuRG7HDGHR5nof8nu5LrsbmSB61V1qqBinance Coin
bnb1zglwcf0ac3d0s2f6ck5kgwvcru4tlctt4p5qefTether
0xcD4Db18B6664A9662123D4307B074aE968535388Dash
Xd3Yn2qZJ7VE8nbKw2fS98aLxR5M6WUU3sStellar
GALPOLPISRHIYHLQER2TLJRGUSZH52RYDK6C3HIU4PSMNAV65Q36EGNL
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Unreleased
0.1 - 2021-09-30
Added
GenerativeImage
classplot
methodgenerate
methodnft_storage
method
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
File details
Details for the file samila-0.1.tar.gz
.
File metadata
- Download URL: samila-0.1.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 831a0a7e207a443372537ea28a4e0a524d4901563413fe020379aa932a74333b |
|
MD5 | 8629b962f66a42ccf6532964cea48e9b |
|
BLAKE2b-256 | 1eef8ea53b4f9002f045c3443853c2cdb9fe217d44133ee267ad1e1aed48cfd0 |
File details
Details for the file samila-0.1-py3-none-any.whl
.
File metadata
- Download URL: samila-0.1-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ea15bd6141dc44e4ee239d1e52317ec5041ff346272f5ec247aa252e30e57e2 |
|
MD5 | 9ba0b9edb0143012a2a4db3d69a66592 |
|
BLAKE2b-256 | b8660a3043b4ed3a4c420d5b51366a145adb8d28ba929a5858404dcfbee420f8 |