Assumptions:
A painting is a closed set of distinct elements, which exist in relatively homogenous sections and are thus distinguishable from their immediate surroundings.
The number of distinct elements which can become a part of a composition is unlimited.
The only type of classification common to all elements is the level of dissimilarity between them.
The only type of transformation applicable to all elements is a change in the relationship of similarity between them.
Theses:
A state of perfect visual harmony exists, such that any perceptible change leads to a lower evaluation of the aesthetic value of the whole.
Any transformation that impacts the similarity between all elements of a composition should have only one direction: towards increasing the dissimilarity between them. The opposite leads, ad extremum, to a completely uniform painting. The process of increasing dissimilarity between elements is limitless; thus, it is necessary to introduce constraint.
The artist determines the limit of dissimilarity for the whole. (For example, they can create a composition using a limited palette, or determine its visual character in some other way.)
All elements must be contrasted with each other to the same degree so that no area disturbs the equilibrium of the whole with local contrast.
Equally, the contrasts between elements must be set at the maximum level, as only then will they maximally emphasise each other’s features. This maximum is determined by the limit of dissimilarity established for the whole painting. It is formed following the requirement to maximally contrast each element with the sum of the rest. (This sum is always the reference point for every new element introduced. Thus, if a new element contrasts with the sum too much or too little, the artist has two options: adjust this contrast to match those within the sum of existing elements; or adjust the contrasts of the sum of existing elements to match the new element.)
Since any element can only be assessed against its surroundings, i.e. against the entire painting, a completely harmonious painting is one where the level of dissimilarity between any element and the sum of all other elements is set at the same, maximum level.
We can describe any closed set of elements of any size as “Sn” and every element of this set as “e”. Thereby, Sn: = {e1, … en}. Furthermore, we can designate the ratio of contrasts between elements as “C”. Thus the harmony algorithm is as follows: