Skip to content
Sign upLog in
← Back to Community

🎨Random Mondrian Art Generator🎨

Profile icon
[deleted]

Most minimalist modern art appears random, so why not make it truly random (fine, pseudorandom)? This code randomly generates work of art in the style of Dutch artist Piet Mondrian (see more of his art on Google).

Here is one of the originals:

piet

This is a work my mondrian art generator made!

Cannot infer image mime type

There is a visible difference and you can tell that this work was not an original. But to me they still look visibly appealing.

Try making your own art by clicking this link > https://Mondrian-art.ieatpython.repl.co

Make sure to upvote if you thought this was cool.

Voters
Profile icon
bradywtw
Profile icon
AllAwesome497
Profile icon
mkhoi
Profile icon
sj42
Profile icon
ash15khng
Profile icon
themaka
Profile icon
sheepyboi
Profile icon
Zavexeon
Profile icon
Allum_c
Comments
hotnewtop
Profile icon
[deleted]

I love the randomness of the art! Nice job!

Profile icon
HappyFakeboulde

@IEATPYTHON
why are you commenting on your own post

Profile icon
[deleted]

@HappyFakeboulde
ssshh it raises my self esteem

Profile icon
HappyFakeboulde

@IEATPYTHON
uhhh okay

Profile icon
ArpanDhatt

Actually, Mondrain's works are not random, but they follow certain rules found in nature. Studies were shown that people can actually distinguish real ones from fakes simply because the real one was more appealing, despite being the same size and using the same colors.

Profile icon
themaka

Very cool. What gave you the idea? Are you a fan of Mondrian art?

Check out: https://www.theartstory.org/artist-mondrian-piet-artworks.htm#pnt_4

Profile icon
[deleted]

@themaka
I actually find Mondrian art kind of dumb. Seeing it is so simple and nothing stands out about it. So I thought I could automate this art and generate art simmlar to it and the originals.

Profile icon
alexmwalker

I think this is an interesting coding problem, but I don't think you understand the original idea as fully as you think you do.

Your version is a complete grid with randomly colored cells. Every single line goes edge to edge – both horizontal and vertical.

In the original Mondrian example, only one line of 18 traverses the entire workspace. That means almost every line finishes in a 'T-intersection' (about 30 by my rough count) that gives it tension and energy. To me, that's a pretty fundamental difference.

That's not to say you couldn't build that idea into an update to your code. Sounds like an interesting challenge.

Profile icon
Zavexeon

I like this. :D

I think maybe give an option to export the image. :) That'd make it even neater.

Profile icon
HappyFakeboulde

Maybe increase the maximum complexity of the shapes and the ratio of colors to white?
Otherwise it's good.
Have an upvote.

Profile icon
[deleted]

@HappyFakeboulde
Thanks for the feedback

Btw everyone on the discord server misses u

Profile icon
HappyFakeboulde

@IEATPYTHON
Well, I don't intend to rejoin

Profile icon
CharlieMorris1

@HappyFakeboulde
peek

Profile icon
HappyFakeboulde

@CharlieMorris1
what

Profile icon
CharlieMorris1

@HappyFakeboulde
reported LOL

Profile icon
HappyFakeboulde

@CharlieMorris1
why did you report me

Profile icon
amasad

@HappyFakeboulde
Charlie is a troll. He's banned.

Profile icon
HappyFakeboulde

@amasad
uh okay

Profile icon
[deleted]

@amasad
wdym