Piet Mondrian

Assignment 1

Program to create the piet Mondrian painting

void setup()
{
size(600,600);
background(255,255,255);
}

void draw()
{
strokeWeight(8);
line(100,0,100,600);
line(600,500,0,500);
line(0,100,100,100);
line(600,550,550,550);
line(550,500,550,600);
noStroke();
fill(255,0,0);
rect(104,0,550,497);
fill(0,0,255);
rect(0,505,100,600);
fill(255,255,0);
rect(550,550,100,600);
}

Out put window

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