Piet Mondrian was in the news. On March, 7th he'll turn 150. Happy Birthday!
Piet was quite a little genius if you think about when he lived. Until then painters were only allowed to paint romantic stuff like saints, nudes, mountains and the like.
Piet discovered the magic of rectangles with repetition, randomness, rhythms and proportion contrasts.
Imagine Piet in our times. He would definitely have been a hero member of our Visguy forum.
In an 101 scenario a piet function would start with a random rectangle. Both portrait and landscape can produce interesting results.
It would then loop over the all shapes of the page and divide them according to a predefined schema.
Not all shapes, since we want some randomness. The randomness could be binary (Yes/No) with a probability of 50/50, or more elaborate by computing a given probability.
n_every_nth_shp = 0.333
if random.randint(0,n_every_nth_shp-1) != 0:
return
Only a third of the shapes would be processed.
And vice versa, at n_every_nth_shp = 0.8, four of five of the shapes are processed.
That comes in handy because the fragmentation of the shapes is always carried along the longer side of the rectangle and skipping some fragmentations will enhance the randomness.
w = shp.Cells('Width').ResultIU
h = shp.Cells('Height').ResultIU
b_vertical = h > w
Depending on b_vertical the function will draw vertical or horizontal lines over the currently processed shape, select both the rectangle and the lines and fragment the whole selection.
That's basically it. Anything coming afterward is pure luxury and playing.
One of the very first results is shown below.
It is very minimalistic, since it has very few shapes. Yet it shows combinations as if it would have been the 100th repetition and I would have spent many creative hours on it.
- Alternance between wide and and narrow columns
- Repeating patterns. The two red combinations and the blue/black ones.
- The combos are in one case distributed over two columns, in the second case agglomerated in one.
- The smaller division on the left versus the bigger on the right side.
- The big yellow square next to the narrow blach and white column.
My favourite.
(https://visguy.com/vgforum/index.php?action=dlattach;attach=10971;type=preview)
Speaking about playing, my tool of choice is obviously python. But no one says it is mandatory - it just happens to be much faster.
The code is very easy to understand and should easily be transcriptable to VBA code.
Python is not quite right, since I work in Jupyterlab, thus I did not need to care about a graphical user interface. Every little piece of code is executed by its own. I don't need to write a perfect and complete program to see my results, I can go step-by-step.
When playing with the results, I did indeed play with the idea to write a GUI, but it would have costed time, that I would have better spent in adjusting the really meaningful functions.
Fun fact, Piet Mondrian and the founder of Python, Guido van Russom are both dutch. It just makes sense to bring them together.
Piet was not only a genious when subdividing his canvas.
I tried removing the outlines of the shapes, so as to leave only the filling.
I did also play with colours - just to be remembered how bad I am at colouring.
The colour combination, black, white, red, blue and yellow just "works".
The black outlines underline the subdivision of the surface. It would otherwise be an agglomeration of surfaces.
(https://visguy.com/vgforum/index.php?action=dlattach;attach=10973;type=preview)
Later on I recalled having seen pallete generators in the Web. I picked the first one in the Google search result.
https://coolors.co/palettes/trending (https://coolors.co/palettes/trending)
Well, Piet's colour combination is not the only one that works.
(https://visguy.com/vgforum/index.php?action=dlattach;attach=10975;type=preview)
I'm too much of a scaredy cat to watch horror movies, but this would be my interpretation of Texas Chain Saw Massacre
... which I haven't watched by the way, so excuse my sanguine exaggeration. ;D
(https://visguy.com/vgforum/index.php?action=dlattach;attach=10977;type=preview)
Having realized, that I don't necessarily need a pallete I began playing with HSL values.
What would I call this? ... Mauve fields?
(https://visguy.com/vgforum/index.php?action=dlattach;attach=10979;type=preview)
Then I extended the subdivision function by an absolute variant. The new line can now get a value that does not depend on the shape's dimensions.
This is why you see these perfect squares.
This one would be "post harvest".
It is late summer, most of the fields have already by been harvested. Some are left.
Can you smell the freshly worked soil?
(https://visguy.com/vgforum/index.php?action=dlattach;attach=10981;type=preview)
Six months later.
Springtime.
Same field.
(https://visguy.com/vgforum/index.php?action=dlattach;attach=10983;type=preview)
Mai, 2nd.
I'm returning from a business trip.
My view from the plane window, minutes before landing.
The fields seem to be divided randomly.
Who's the big potato in the middle?
(https://visguy.com/vgforum/index.php?action=dlattach;attach=10985;type=preview)
You know what? Try it by yourself.
Here's the source code.
... and if too lazy to compute yourself, just watch the original visio drawing here.
Who next? Miro, Picasso, Pollock?
They are visio-wise probably harder pieces of cake.
We are not yet fully using Visio's potential.
Quote from: Yacine on March 06, 2022, 12:01:47 PM
I'm too much of a scaredy cat to watch horror movies, but this would be my interpretation of texas chain massacre - which I haven't watched by the way, so excuse my sanguine exaggeration. ;D
Wondering how this would look in blue?
...and if you allowed some randomness to the shapes say circles, triangles? Or rotational variants?
Quote from: Yacine on March 06, 2022, 12:27:15 PM
Mai, 2nd.
I'm returning from a business trip.
My view from the plane window, minutes before landing.
The fields seem to be divided randomly.
Who's the big potato in the middle?
Or, variant using red, black, and brown...Volcano!!!
...or, taking an existing image, and digitizing / transforming it into a Piet, impressionist abstraction?
Quote from: wapperdude on March 06, 2022, 04:14:43 PM
Quote from: Yacine on March 06, 2022, 12:01:47 PM
I'm too much of a scaredy cat to watch horror movies, but this would be my interpretation of texas chain massacre - which I haven't watched by the way, so excuse my sanguine exaggeration. ;D
Wondering how this would look in blue?
That would be the Texas Chainsaw Octopus Massacre.
I though his paintings were just very complicated Rubik's Cubes!
Quote from: Yacine on March 06, 2022, 12:32:04 PM
Here's the source code.
Hi, Yacine!
ipynb-notebooks can render In githab :) if they not very complex.
This example (https://github.com/michelucci/Sandbox/blob/master/Logistic%20Regression%20Part%201.ipynb) looks fine
Quote from: Surrogate on March 07, 2022, 05:28:22 AM
Quote from: Yacine on March 06, 2022, 12:32:04 PM
Here's the source code.
Hi, Yacine!
ipynb-notebooks can render In githab :) if they not very complex.
This example (https://github.com/michelucci/Sandbox/blob/master/Logistic%20Regression%20Part%201.ipynb) looks fine
So you are still having troubles with jupyter lab?
Quote from: Paul Herber on March 06, 2022, 08:13:50 PM
I though his paintings were just very complicated Rubik's Cubes!
That's right, to appreciate it you need to understand the language spoken.
Think of a Hieronimus Bosch, his work despite being very depictive lives from symboles. If you can't read them they are only vivid scribbling.
@Wapperdude,
Yes, an infinite sea of possibilities. A new hobby for a retiree? ;)
With Piet, I had actually specially you in mind. The boring Python part was more for Paul and Surrogate. ;D
Quote from: Yacine on March 07, 2022, 07:28:17 AM
So you are still having troubles with jupyter lab?
I re-install Anaconda 2 weeks ago. Yes, I cant debug (?) code with jupyter lab/notebook. Also with VS Code.
I don't have time for experiments these days :-\
Quote from: Yacine on March 07, 2022, 08:30:47 AM
@Wapperdude,
Yes, an infinite sea of possibilities. A new hobby for a retiree? ;)
With Piet, I had actually specially you in mind. The boring Python part was more for Paul and Surrogate. ;D
Actually, it is tempting. It would be more of an branching of an existing hobby...photography. Perhaps creative, pseudo artwork is a more apt description. I've taken existing photos (mine) and done significant editing. Plus, explored the world of fractals. So this has an appeal to such endeavors. But, not soon. In the process of doing some remodelling, plus some exegetical research. Then, there's 3 ferrel cats that are an ongoing "trust-building" project. Add to that grandkids...life is not dull and provides unexpected challenges.
Really cool Yacine!
Thank you.