Assignment 1

OBJECTIVE:

Select any painting of Piet Mondrian and reproduce it using Processing software.

PAINTING SELECTED:

Original

PROGRAM:

int b=700;//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*0.001*b);
line(0,int(b*0.36),b,int(b*0.36));
line(0,int(b*0.573),b,int(b*0.573));
strokeWeight(12*0.001*b);
line(0,int(b*0.68),b,int(b*0.68));
strokeWeight(10*0.001*b);
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));
}

OUTPUT:

Output_1
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License