Tuesday, 22 November 2011

Genetic Code for Mondrian-ish images


In my earlier post I described how I had generated some Mondrian-ish images, according to simple rules that I had proposed.

The panels generated according to these simple rules can be described using an artificial language, rather in the manner that a chromosome can be described using a genetic code.





Take a look at the six evolving panels in the above image.

The first (top-left) can be described by the code HYR, meaning Horizontally divided panel with Yellow above Red.

The second (top-row) can be described by the code HWW, which is White above White.

The third (top-row) is just the Vertical composition of these first two panels. That is panel one beside panel two. We give this the code V HYR HWW, meaning Vertically divided panel with HYR beside HWW, i.e. panel one beside panel two.

Continuing in this way, the first two panels on the bottom line would read HWB and HWW. respectively. Note that in this description we are omitting details of the ratio in which panels are divided.

The third panel in the bottom row then has the description V HWB HWW, being the Verical composition of the two preceding panels on the bottom row. That is HWB above HWW.

Now we have the elements that we need to make our final composition. The final panel on the left (which is the same as the completed Mondrian-ish image shown first in my earlier post)

The final panel is then the Horizontal composition is described by

H VHYRHWW VHWBHWW

which is the DNA of this particular Mondrian-ish image.

In fact, the formulation

H VH**H** VH**H**

describes all of the panels which were presented in my earlier post , if only we replace the *'s with colours according to our rules. And choose appropriate ratios for the divisions