Girl with the Pearl Earring Processing Drawing

Screen Shot 2015-09-08 at 12.03.44 AM

float oldX;
float oldY;
color lighttan= color(220, 200, 189, 40);
color shadedtan= color(123, 96, 77, 40);
color tan= color(167, 127, 102, 40);
color lightblue= color(145, 160, 181, 40);
color mediumblue= color(121, 161, 197, 40);
color darkblue= color(47, 57, 82, 40);
color dullyellow= color(246, 212, 151, 40);
color midyellow= color(154, 138, 104, 40);
color darkyellow= color(82, 63, 48, 40);
color graybrown= color(58, 51, 41, 40);
color white= color(255,40);
color black= color(0, 40);
color red= color(197, 63, 51);
float masterStroke= 1;

void setup(){
size(480, 720);
smooth();
background(0);

}

void draw(){
strokeWeight(1);
fill(lighttan );
rect(10, 10, 20, 20 );
fill(tan );
rect(35, 10, 20, 20 );
fill(shadedtan);
rect(10, 35, 20, 20);
fill(lightblue);
rect(35, 35, 20, 20);
fill(mediumblue);
rect(10, 60, 20, 20);
fill(darkblue);
rect(35, 60, 20, 20);
fill(dullyellow);
rect(10, 85, 20, 20);
fill(midyellow);
rect(35, 85, 20, 20);
fill(darkyellow);
rect(10, 110, 20, 20);
fill(graybrown);
rect(35, 110, 20, 20);
fill(white);
rect(10, 135, 20, 20);
fill(black);
rect(35, 135, 20, 20);
fill(red);
rect(10, 160, 20, 20);
line(450, 30, 500, 30);
strokeWeight(8);
line(450, 50, 500, 50);
strokeWeight(16);
line(450, 80, 500, 80);
strokeWeight(4);
fill(255);
rect(250, 10, 50, 50);

if(mousePressed) {
if(mouseX > 10 && mouseX < 35){
if(mouseY >10 && mouseY < 35){
stroke(lighttan);
}
if(mouseY>35 && mouseY < 60){
stroke(shadedtan);
}
if(mouseY>60 && mouseY<85){
stroke(mediumblue);
}
if(mouseY>85 && mouseY<110){
stroke(dullyellow);
}
if(mouseY>110 && mouseY<135){
stroke(darkyellow);
}
if(mouseY>135 && mouseY<160){
stroke(white);
}
if(mouseY>160 && mouseY<185){
stroke (red);
}
}
if(mouseX > 35 && mouseX < 60){
if( mouseY > 10 && mouseY <35){
stroke(tan);
}
if(mouseY > 35 && mouseY < 50){
stroke(lightblue);
}
if(mouseY > 60 && mouseY < 85){
stroke(darkblue);
}
if(mouseY >85 && mouseY < 110) {
stroke(midyellow);
}
if(mouseY > 110 && mouseY <135){
stroke(graybrown);
}
if(mouseY >135 && mouseY <160){
stroke(black);
}
}
if(mousePressed){
if(mouseX > 450 && mouseX <500){
if(mouseY >10 && mouseY <40){
masterStroke= 4; }
}
if(mouseX > 450 && mouseX <500){
if(mouseY >40 && mouseY <70){
masterStroke= 12; }
}
if(mouseX > 450 && mouseX <500){
if(mouseY > 70 && mouseY <100){
masterStroke= 21;
}
}
strokeWeight(masterStroke);
}
if(mousePressed){
if(mouseX > 250 && mouseX <300){
if (mouseY > 10 && mouseY <60){
background(0);
}
}
}
if(mousePressed){
line(mouseX, mouseY, oldX, oldY);
}
}
oldX=mouseX;
oldY=mouseY;
}

Advertisements
This entry was posted in Non-Timebased and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s