Skip to content

Generation of Mondrian's abstract art -- it's as easy as py

Notifications You must be signed in to change notification settings

psiofxt/mondrian-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mondrian-gen

Utilizing tkinter, rectangles are recursively drawn to mimic the style of Mondrian's abstract art.

Images are saved using Ghostscript to the /img folder.

After a new image is generated and saved, the structural similarity of this image compared to a pool of "base" Mondrian images is calculated in color and in grayscale. The average ssim value for color and gray is displayed at the top of the window.

Installation

Python 3.6 is required.

To install Ghoscript (Linux):

sudo apt-get install ghostscript

Mac:

brew install ghostscript

Install the image processing requirements:

pip install -r requirements.txt

Finally, to run the abstract goodness:

python mondrian.py

Changes

3/6/18 -- added thresholds to ensure no squares overlap

3/7/18 -- added simulation to generate most Mondrian-like image

Examples

alt text

alt text

alt text

alt text

Increasing volume of squares

alt text

alt text

Displaying ssim index

alt text

About

Generation of Mondrian's abstract art -- it's as easy as py

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages