Created
September 9, 2014 06:14
-
-
Save nataliefreed/f0f97a24a12135abe5ae to your computer and use it in GitHub Desktop.
Circle decreases in size over time. Click mouse to save a "screenshot" of its current state.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Art and Science of Computing Fall 14 | |
//Circle decreases in size over time | |
//Click mouse to save a "screenshot" of its current state | |
float diameter = 200; | |
void setup() | |
{ | |
size(300, 300); | |
strokeWeight(5); | |
} | |
void draw() | |
{ | |
background(255); | |
ellipse(width/2, height/2, diameter, diameter); | |
diameter = diameter - 0.1; | |
} | |
void mousePressed() | |
{ | |
saveFrame("circle.png"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment