Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //challenge accepted
- //turn that smile upside down
- //Created as a collaborative project by Intro to Computer Science, Fall 2015
- void setup()
- {
- size(500,500);
- background( #B0E57C);
- }
- void draw()
- {
- int myColor = get(mouseX,mouseY);
- if(myColor == -20818 || myColor == -16777216 )
- {
- sadFace();
- }
- else
- {
- happyFace();
- }
- //fill(#000000);
- //arc(50, 55, 60, 60, PI/2, PI);
- }
- void happyFace()
- {
- fill(#FFAEAE);
- ellipse(250,250,250,250);
- fill(#000000);
- ellipse(200,200,45,45);
- ellipse(300,200,45,45);
- arc(250, 275, 100, 100, 0, PI);
- }
- void sadFace()
- {
- fill(#FFAEAE);
- ellipse(250,250,250,250);
- fill(#000000);
- ellipse(200,200,45,45);
- ellipse(300,200,45,45);
- //rotate(PI);
- arc(250, 300, 100, 100, PI, TWO_PI);
- //rotate(-PI);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement