/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://bard117f12.sketchpad.cc/sp/pad/view/ro.gsWIx3QaO7s/rev.192
*
* authors:
*
*
*
* Benjamin Barron
* Ruby Jackson
*
*
* Harrison
*
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
/* Benjamin Barron
September 18, 2012
[email protected]
Assignment 2: Self-portrait II
This self portrait differs from my first one as the features are more simplified into a smiley face. The face and its features move according to the position of the mouse's x and y coordinates. The background and face features' colors change each frame. Because the background is refreshed each frame, the smiley face is only seen once each frame as opposed to being painted on top of itself endlessly.*/
void setup() {
size(800, 500);
smooth();
frameRate(50);
colorMode(HSB,360,100,100);
}
void draw() {
background(frameCount%360,100,100);
ellipseMode(CENTER);
//face
stroke(1);
fill(frameCount%100,100,100);
ellipse(mouseX,mouseY,40,40);
//face features
fill(0);
ellipse(mouseX-5,mouseY-5,3,3);
ellipse(mouseX+5,mouseY-5,3,3);
fill(frameCount%100,100,100);
arc(mouseX, mouseY, 25, 25, PI / 6, PI / 1.2);
}