Python package that produces randomly-generated Mondrian-style plots
Project description
mondrian-maker
Python package that produces randomly-generated Mondrian-style plots.
This python library allows the user to create Mondrian De Stijl-style images via numpy and matplotlib. Piet Mondrian was one of the most influential artists of the 20th century. The package mondrian-maker
seeks to recreate his style via randomly-generated (or user-defined) sets of numbers.
Output Samples
The samples below show a sample Mondrian painting as well as an example of the output of the mondrian module. The output is generally formatted as a pdf file, which can be converted into other extensions.
Composition with Red, Blue, and Yellow, Piet Mondrian, 1930
mondrian.py
-generated plot
Installation
Dependencies for this project are listed in requirements.txt
. This library is compatible with python3 >= 3.7.6
and requires both git
and pip
to be installed locally. This repository can be installed via the following steps:
git clone https://github.com/andrewbowen19/mondrian-maker.git
From the command-line:
cd mondrian-maker
Then, you can install via pip
.
pip install .
We are also planning on publishing this package to PyPi to allow pip install without neeeding to clone this repo.
Usage
If pip installed locally, the mondrian class can be imported into a python script as shown below:
from mondrian_maker.mondrian import mondrian
m = mondrian()
m.make_mondrian(<args>)
The mondrian
class in the mondrian_maker.mondrian
module contained the method make_mondrian
which actually creates the plot. In addition, the mondrian.py
module can be run directly with python command-line args
python mondrian.py --n_plots <int> --savefig <boolean> --array_size <int> --title <str>
TODO
- Add more command-line arguments to parser for direct run by user
- Make sphinx docs (readthedocs)
- Publish to PyPi
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 Distributions
Built Distribution
File details
Details for the file mondrian_maker-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: mondrian_maker-0.0.1-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bd892349b493be783374b2e17c7088747e5570fe3a81b1eb3dc269a27032c68 |
|
MD5 | 1a71e397b3bdd96c8ad0d034204e4eae |
|
BLAKE2b-256 | 37046202c63cd5597777f661defad9f96b875d35440ddce0fc5e736cc854d520 |