kopia lustrzana https://github.com/sepandhaghighi/samila
Minor edits (#86)
* update : 3.png updated. * update : pictures updated. * revert : images reverted. * update : README.md updated. * update : README.md updated.pull/106/head
rodzic
6433357081
commit
c802a4088a
|
@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||
- `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__`
|
||||
|
|
28
README.md
28
README.md
|
@ -114,13 +114,13 @@ Samila is a generative art generator written in Python, Samila let's you create
|
|||
```pycon
|
||||
>>> import random
|
||||
>>> import math
|
||||
>>> def f1(x,y):
|
||||
>>> def f1(x, y):
|
||||
result = random.uniform(-1,1) * x**2 - math.sin(y**2) + abs(y-x)
|
||||
return result
|
||||
>>> def f2(x,y):
|
||||
>>> def f2(x, y):
|
||||
result = random.uniform(-1,1) * y**3 - math.cos(x**2) + 2*x
|
||||
return result
|
||||
>>> g = GenerativeImage(f1,f2)
|
||||
>>> g = GenerativeImage(f1, f2)
|
||||
>>> g.generate()
|
||||
>>> g.plot()
|
||||
>>> g.seed
|
||||
|
@ -132,7 +132,7 @@ Samila is a generative art generator written in Python, Samila let's you create
|
|||
### Projection
|
||||
```pycon
|
||||
>>> from samila import Projection
|
||||
>>> g = GenerativeImage(f1,f2)
|
||||
>>> g = GenerativeImage(f1, f2)
|
||||
>>> g.generate()
|
||||
>>> g.plot(projection=Projection.POLAR)
|
||||
>>> g.seed
|
||||
|
@ -146,8 +146,8 @@ Samila is a generative art generator written in Python, Samila let's you create
|
|||
|
||||
### Range
|
||||
```pycon
|
||||
>>> g = GenerativeImage(f1,f2)
|
||||
>>> g.generate(start = -2*math.pi,step=0.1,stop=0)
|
||||
>>> g = GenerativeImage(f1, f2)
|
||||
>>> g.generate(start=-2*math.pi, step=0.01, stop=0)
|
||||
>>> g.plot()
|
||||
>>> g.seed
|
||||
234752
|
||||
|
@ -157,9 +157,9 @@ Samila is a generative art generator written in Python, Samila let's you create
|
|||
|
||||
### Color
|
||||
```pycon
|
||||
>>> g = GenerativeImage(f1,f2)
|
||||
>>> g = GenerativeImage(f1, f2)
|
||||
>>> g.generate()
|
||||
>>> g.plot(color="yellow",bgcolor="black",projection=Projection.POLAR)
|
||||
>>> g.plot(color="yellow", bgcolor="black", projection=Projection.POLAR)
|
||||
>>> g.seed
|
||||
1018273
|
||||
>>> plt.show()
|
||||
|
@ -171,7 +171,7 @@ Samila is a generative art generator written in Python, Samila let's you create
|
|||
|
||||
### Regeneration
|
||||
```pycon
|
||||
>>> g = GenerativeImage(f1,f2)
|
||||
>>> g = GenerativeImage(f1, f2)
|
||||
>>> g.generate(seed=1018273)
|
||||
>>> g.plot(projection=Projection.POLAR)
|
||||
>>> plt.show()
|
||||
|
@ -182,7 +182,7 @@ Samila is a generative art generator written in Python, Samila let's you create
|
|||
Upload generated image directly to [NFT.storage](https://NFT.storage)
|
||||
|
||||
```pycon
|
||||
>>> g.nft_storage(api_key = YOUR_API_KEY)
|
||||
>>> g.nft_storage(api_key=YOUR_API_KEY)
|
||||
{'status': True, 'message': 'Everything seems good'}
|
||||
```
|
||||
|
||||
|
@ -237,10 +237,10 @@ We have set of points in the first space (left square) which can be define as fo
|
|||
And bellow functions are used for transformation:
|
||||
|
||||
```pycon
|
||||
>>> def f1(x,y):
|
||||
result = random.uniform(-1,1) * x**2 - math.sin(y**2) + abs(y-x)
|
||||
>>> def f1(x, y):
|
||||
result = random.uniform(-1,1) * x**2 - math.sin(y**2) + abs(y-x)
|
||||
return result
|
||||
>>> def f2(x,y):
|
||||
>>> def f2(x, y):
|
||||
result = random.uniform(-1,1) * y**3 - math.cos(x**2) + 2*x
|
||||
return result
|
||||
```
|
||||
|
@ -250,7 +250,7 @@ And bellow functions are used for transformation:
|
|||
here we uses `Projection.POLAR` so later space will be the polar space and we have:
|
||||
|
||||
```pycon
|
||||
>>> g = GenerativeImage(f1,f2)
|
||||
>>> g = GenerativeImage(f1, f2)
|
||||
>>> g.generate(seed=10)
|
||||
>>> g.plot(projection=Projection.POLAR)
|
||||
```
|
||||
|
|
Plik binarny nie jest wyświetlany.
Przed Szerokość: | Wysokość: | Rozmiar: 302 KiB Po Szerokość: | Wysokość: | Rozmiar: 251 KiB |
Ładowanie…
Reference in New Issue