/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://dflab.sketchpad.cc/sp/pad/view/ro.wDa1leAMbbs/rev.262
*
* authors:
* Silas Silva
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
// This sketch builds on a prior work, "Pedro Coelho - 02 Movimento", created by pedro coelho
// http://dflab.sketchpad.cc/sp/pad/view/ro.9BjOEcrXQz4Hqt/rev.484
float x = 100;
float y = 0;
float speed = 2;
float acceleration = 1;
void setup() {
size(500,500);
frameRate(20);
x = width/2;
y = height/2;
}
void draw() {
background(255, 34, 77);
fill(123, 56, 0);
stroke(0);
ellipse(x,y,50,50);
x = x + speed;
speed = speed + acceleration;
if (x > height) {
x = 0;
y = y + 100;
}
if (y > width) {
y = 0 }
}
float x = 0;
float y = 100;
float speed = 2;
float acceleration = 1;
void setup() {
size(500,500);
frameRate(20);
x = width/3;
y = height/3;
}
void draw() {
fill(198, 56, 56);
stroke(0);
ellipse(x,y,50,50);
x = x + speed;
speed = speed + acceleration;
if (x > height) {
x = 0;
y = y + 100;
}
if (y > width) {
y = 0 }
}