Main Menu

Piet

Started by Yacine, March 06, 2022, 11:42:10 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yacine

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.
Yacine

Yacine

#1
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.
Yacine

Yacine

#2
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.
Yacine

Yacine

#3
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.
Yacine

Yacine

#4
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

Well, Piet's colour combination is not the only one that works.
Yacine

Yacine

#5
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
Yacine

Yacine

#6
Having realized, that I don't necessarily need a pallete I began playing with HSL values.
What would I call this? ... Mauve fields?
Yacine

Yacine

#7
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?
Yacine

Yacine

#8
Six months later.
  Springtime.
    Same field.
Yacine

Yacine

#9
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?
Yacine

Yacine

You know what? Try it by yourself.
Here's the source code.
Yacine

Yacine

... and if too lazy to compute yourself, just watch the original visio drawing here.
Yacine

Yacine

#12
Who next? Miro, Picasso, Pollock?
They are visio-wise probably harder pieces of cake.


We are not yet fully using Visio's potential.
Yacine

wapperdude

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? 
Visio 2019 Pro

wapperdude

...and if you allowed some randomness to the shapes say circles, triangles?  Or rotational variants?
Visio 2019 Pro