/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://dflab.sketchpad.cc/sp/pad/view/ro.XcATgAked3r/rev.244
*
* authors:
* Maria Joao Costa
* 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, "Bruno Goncalves – 02 – A coisa vermelha ", created by Bruno Goncalves
// http://dflab.sketchpad.cc/sp/pad/view/ro.98AUuz5n8IicO8/rev.138
float x = 100;
float y = 150;
float speed = 2;
float acceleration = 0.1;
void setup() {
size(500,500);
frameRate(20);
x = width/1;
y = height/1;
}
void draw() {
background(0);
fill(250,0,0);
ellipse(x,y,400,400);
fill(0, 211, 237, 200);
ellipse(x,x,400,400);
fill(255,3,167, 150);
ellipse(y,x,400,400)
noStroke ();
fill(3, 255, 71, 0);
ellipse(y,y,400,400)
x = x + speed;
speed = speed + acceleration;
if (x > height) {
x = 50;
y = x + 50;
}
if (y > width) {
y = 50 }
}