cfdg-inspired cairo-based pythonic generative art framework
Project description
CFDG-inspired cairo-based pythonic generative art tool
Here is an example of simple code producing stochastic fractal tree:
from contextfree.contextfree import *
@check_limits
def branch():
line(0,1)
with translate(0,0.9):
with scale(0.7+ rnd(0.3)):
with rotate(-0.4 + rnd(0.5)):
branch()
with rotate(0.4 + rnd(0.5)):
branch()
init(canvas_size=(300,300))
with translate(0, -1):
with scale(0.6):
branch()
display_ipython()
Here is the output:
Check examples folder for more fun stuff.
How do I get set up?
pip3 install contextfree for latest stable release
pip3 install git+https://github.com/undertherain/pycontextfree.git for recent development version
Python 3.4 or later is required
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
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for contextfree-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 499f7f51e49fbb9f1b4e1b9658e4c12225498b44fa9ca7e149fed108d3daf11a |
|
MD5 | b133caad7c24e91abcdd288e4da59f2a |
|
BLAKE2b-256 | 0c6d9a5d5e738fc2030f01308c1f922d84f3e442419f4c288d9e2dc4aacd974d |