/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://bard117s14.sketchpad.cc/sp/pad/view/ro.VZPkye7Yfme/rev.21
*
* authors:
* Lucas Baumgart
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
/*Lucas Baumgart
*2/18/14
*[email protected]
* self portrait II
* Intention: Create a multicolored self portrait that reflects, albeit * minorly,
* my facade (ie large lips, perpetual surprise/interest, &c)
* A mouse click elicits the appearance of sunglasses,
* and a key press the appearance of a halo, which increases in
* intensity with each click.
*/
void setup() {
size(500, 600);
background(255, 240, 245);
smooth();
fill(255, 0, 0, 50);
strokeWeight(5);
stroke(255);
ellipse(width/2, height/2, 500, 600);
stroke(0);
fill (0, 200, 0) ; // eyes (left, right)
ellipse(150, 200, 75, 75) ;
ellipse(350, 200, 75, 75) ;
fill (150); // eyes (middle: left, right)
ellipse(150, 200, 20, 20);
fill (150);
ellipse(350, 200, 20, 20);
strokeWeight(7.5); //eyebrow 1
line(100, 150, 200, 150);
strokeWeight(7.5); // eyebrow 2 (raised)
line(400, 150, 300, 100);
strokeWeight(3);
rect(width/2, height/2, 20, 40) ;
rect(width/2, height/2, 40, 20) ;
stroke(250, 0, 0);
fill(200, 0, 0); //mouth
ellipse(250, 450, 150, 50);
strokeWeight(5);
stroke(255);
}
float v = random(50, 255);
float o = random(50, 100);
float m = random(100, 200);
int z = 450;
void draw() {
if (mouseY > height/3) {
z = z + 10;
stroke(250,v,v);
fill (250, v, v);
ellipse(250, z, 20, 20);
stroke(v,250,v);
fill (v, 250, v);
ellipse(230, z, 20, 20);
stroke(v,250,250);
fill (v, 250, 250);
ellipse(270, z, 20, 20);
}
else {
stroke(250, 0, 0);
fill(200, 0, 0); //mouth
ellipse(250, 450, 150, 50);
strokeWeight(5);
stroke(255);
}
}
void mousePressed() { //put on sunglasses
fill(0);
ellipse(150, 200, 100, 100) ;
ellipse(350, 200, 100, 100) ;
stroke(0);
line (150, 200, 350, 200);
}
void keyPressed() { //ignite halo
fill(250, 250, 0, 50);
stroke(0, 0, 0, 0);
ellipse(width/2, 75, width, 50);
}