/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://bard117s14.sketchpad.cc/sp/pad/view/ro.e6xJzLyn8SS/rev.117
*
* authors:
*
* Milo Ben-Amotz
* Lucas Baumgart
*
* zoe
* Lauren Harris
*
* josh abramovici
*
* Keith O'Hara
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
/*
Josh Abramovici
1/30/14
[email protected]
Self Portrait
This Self Portrait presents interactivity for the first time. Pressing a key results in a change in eye color, while pressing the mouse results in a text display. It was challenging to innovate possible methods of animation--at first I intented to make a blinking eye, but settled for color dynamics.
*/
void setup() {
size (500, 500);
//background (200, 255, 240);
smooth ();
}
void draw() {
background (200, 255, 240);
float r = random(0, 255);
float g = random(0, 255);
float b = random(0, 255);
//face
stroke(0);
fill (242, 230, 220);
ellipse (width/2, height/2, 300, 350);
// eyes
fill (255);
ellipse (175, 200, 65, 50);
fill (0);
stroke (0, 150, 250);
strokeWeight(10);
ellipse (175, 200, 20, 20);
fill (255);
stroke (0);
strokeWeight(2);
ellipse (320, 200, 65, 50);
fill (0);
stroke (0, 150, 250);
strokeWeight(10);
ellipse (320, 200, 20, 20);
//eye color random
if (keyPressed) {
stroke(r, g, b);
ellipse( 175, 200, 21, 21);
ellipse (320, 200, 21, 21);
}
//nose
stroke (0);
strokeWeight(1);
line (240, 220, 275, 275);
line (230, 274, 275, 275);
//mouth
stroke (200, 0, 0);
strokeWeight(2);
fill (255);
ellipse (width/2, 365, 100, 50);
//text
if (mousePressed) {
fill(r, g, b);
text ( "hey what's good", 203, 370);
}
}