Skip to content

Generative art demo made in Python to showcase a basic example for the Gitcoin grant

Notifications You must be signed in to change notification settings

cennznet/generative-art-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

generative-art-demo

Generative art demo made in Python to showcase a basic example for the Gitcoin grant This project works by looping through and drawing squares in a grid pattern. The squares have different aspects that can be randomised such as:

  • Size
  • Rotation
  • Colour
  • thickness

These attributes can be changed with the following lines of code:

# Image Variable Constraints
image_size = 1000
squares_across = 15
background_colour = (0, 0, 0)
colours_min_max = [(0.1, 0, .1), (1, 0, 1)]
size_min_max = [.3, .8]
rotation_min_max = [-10, 10]
line_thickness_min_max = [1, 5]

This generator uses the Python package pyCairo to draw the shapes and save the image as a .png The script can easily be altered to produce a wide variety of generated images and with further alterations, can loop through and randomly generate any amount that you like.

To get started, simply set up your Python virtual environment on your local machine, install the dependencies specified by the requirements.txt file and run the GenerateArt.py script. Python version used for demo 3.9.6

Run the following command to install the requirements

pip install -r requirements.txt

Here are some example outputs of what the generator can produce

About

Generative art demo made in Python to showcase a basic example for the Gitcoin grant

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages