Skip to main content

Using a blend of Python and Maths for the creation of images

Project description

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>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stylo-0.1.0.tar.gz (17.7 kB view details)

Uploaded Source

File details

Details for the file stylo-0.1.0.tar.gz.

File metadata

  • Download URL: stylo-0.1.0.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for stylo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8d49dda08a6e1c3bc9b76ab47e59c70d032c93c546998ba1777b66129a26ce34
MD5 3b5e0ce90c50bc41cd595d73fcef0fa7
BLAKE2b-256 3d0cec54d41f803ed0be494b09c9cb741f62d1323d78edd581e0efd2aa8d5118

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page