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.15)):
with color(alpha=0.95):
with rotate(-0.3 + rnd(0.3)):
branch()
with rotate(0.3 + rnd(0.3)):
branch()
init(canvas_size=(300,300), background_color="#FFFFFF")
with scale(3):
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.6 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
File details
Details for the file contextfree-0.3.7-py3-none-any.whl
.
File metadata
- Download URL: contextfree-0.3.7-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0fa28ee162205f5ec4a7fa9f9adea64c2e16e1a73be02566bed67986f396886 |
|
MD5 | 9eeeb3e5290e8d4621ce329cfe7ee891 |
|
BLAKE2b-256 | 137a4cd7cdb964e0eace3e51e85e2bf21dc14fd2bb151b379af061c14323f3fc |