assignment1_ saurabh

First Assignment

by

Saurabh Srivastava

Piet Mondrian

To reproduce a Piet Mondrian work using processing Language.

Original Pic:

original.png

The Processing Code:

[[int x=350;
int y=500;
void setup()
{
size(x,y);
background(255,255,255);
}
void draw()
{
strokeWeight(x/100);

line(0,y/13.7*9,x,y/13.7*9);

fill(255,255,255);
rect(0,0,x/5,y/100*24);

fill (255,0,0);
rect (x/5,y/100*.3,x/1.1,y/200*163);

fill (0,0,255);
rect (0,y/100*66,x/5,y/100*24);

}
]]

Output after coding in processing:

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