As an introduction to processing software we were supposed to select any one of the paintings by Piet Mondrian whose work is mainly in flat horizontal,vertical lines and simple geometrical shapes and represent it using Processing software. The selected work is one of his signature style - grid work painting which is untitled.
Painting selected:
Program:
int b=500;//Dimension of the picture
void setup()
{
size(b,b);
noStroke();
background(255,255,255);
}
void draw()
{
fill(13,79,155);
noStroke();
rect(int(b*0.44),int(b*0.68),int(b*0.293),int(b*0.273));
noFill();
stroke(31,26,23);
strokeWeight(15);
line(0,int(b*0.36),b,int(b*0.36));
line(0,int(b*0.573),b,int(b*0.573));
strokeWeight(12);
line(0,int(b*0.68),b,int(b*0.68));
strokeWeight(10);
line(int(b*0.44),0,int(b*0.44),b);
line(int(b*0.733),int(b*0.68),int(b*0.733),b);
line(int(b*0.44),int(b*0.953),int(b*0.733),int(b*0.953));
}
Result: