Removing some examples

This commit is contained in:
Casey Reas
2011-09-06 03:51:23 +00:00
parent 5e0e9eaedc
commit 68c460be7d
30 changed files with 76 additions and 1215 deletions
@@ -4,7 +4,7 @@
* When the shape hits the edge of the window, it reverses its direction.
*/
int size = 60; // Width of the shape
int rad = 60; // Width of the shape
float xpos, ypos; // Starting position of shape
float xspeed = 2.8; // Speed of the shape
@@ -16,9 +16,10 @@ int ydirection = 1; // Top to Bottom
void setup()
{
size(640, 200);
size(640, 360);
noStroke();
frameRate(30);
ellipseMode(RADIUS);
smooth();
// Set the starting position of the shape
xpos = width/2;
@@ -35,13 +36,13 @@ void draw()
// Test to see if the shape exceeds the boundaries of the screen
// If it does, reverse its direction by multiplying by -1
if (xpos > width-size || xpos < 0) {
if (xpos > width-rad || xpos < rad) {
xdirection *= -1;
}
if (ypos > height-size || ypos < 0) {
if (ypos > height-rad || ypos < rad) {
ydirection *= -1;
}
// Draw the shape
ellipse(xpos+size/2, ypos+size/2, size, size);
ellipse(xpos, ypos, rad, rad);
}