Stylo
---------
Stylo is a framework that attempts to allow users to easily describe the
contents of an image using a blend of Python and Mathematics. It also provides
tools that allow for easy parameterisation of the contents of an image opening
up the possibilities for the creation of animations.
One of the design goals is to minimise the amount of code needed from the user
to achieve the desired result.
Requirements
------------
This framework is Python 3 only, and has the following dependencies:
- Numpy
- Pillow
- Matplotlib
Installation
------------
Stylo is available on PyPi and can easily be installed using Pip:
.. code::
$ pip install stylo
Alternatively you can grab the latest source code using Git:
.. code::
$ git clone https://github.com/alcarney/stylo
Getting Started
---------------
Once installed it's relatively straightforward to get started - provided you
are familiar with a few concepts from mathematics such as Cartesian and Polar
coordinates.
Here is a 'Hello World' example where we draw Pacman::
.. code::
from stylo import Image, cartesian, polar, between
@cartesian()
@polar()
def pacman(x, y, r, t):
return r <= 0.8 and not between(-0.6, t, 0.6)
@pacman.colormap
def color():
return (255, 255, 0)
img = Image(512, 512)
img(pacman)
img.save('pacman.png')
<Insert nice explanation here>
---------
Stylo is a framework that attempts to allow users to easily describe the
contents of an image using a blend of Python and Mathematics. It also provides
tools that allow for easy parameterisation of the contents of an image opening
up the possibilities for the creation of animations.
One of the design goals is to minimise the amount of code needed from the user
to achieve the desired result.
Requirements
------------
This framework is Python 3 only, and has the following dependencies:
- Numpy
- Pillow
- Matplotlib
Installation
------------
Stylo is available on PyPi and can easily be installed using Pip:
.. code::
$ pip install stylo
Alternatively you can grab the latest source code using Git:
.. code::
$ git clone https://github.com/alcarney/stylo
Getting Started
---------------
Once installed it's relatively straightforward to get started - provided you
are familiar with a few concepts from mathematics such as Cartesian and Polar
coordinates.
Here is a 'Hello World' example where we draw Pacman::
.. code::
from stylo import Image, cartesian, polar, between
@cartesian()
@polar()
def pacman(x, y, r, t):
return r <= 0.8 and not between(-0.6, t, 0.6)
@pacman.colormap
def color():
return (255, 255, 0)
img = Image(512, 512)
img(pacman)
img.save('pacman.png')
<Insert nice explanation here>
Release files for stylo 0.1.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 | |
|---|---|---|---|
| stylo-0.1.0.tar.gz | 17.7 kB | Details |
Release files / stylo-0.1.0.tar.gz
| Download URL | stylo-0.1.0.tar.gz |
|---|---|
| Size | 17.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d49dda08a6e1c3bc9b76ab47e59c70d032c93c546998ba1777b66129a26ce34
|
|
BLAKE2b-256 checksum How to use checksums |
3d0cec54d41f803ed0be494b09c9cb741f62d1323d78edd581e0efd2aa8d5118
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |