/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://dflab.sketchpad.cc/sp/pad/view/ro.GeeOWp$YpUx/rev.179
*
* authors:
* André Reis
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
float diameter;
float angle = 0;
void setup() {
size(400, 400);
diameter = height - 10;
fill(25, 204, 0);
}
void draw() {
background(20,20,200);
float d1 = 10 + (sin(angle) * diameter/2) + diameter/3;
float d2 = 10 + (sin(angle + PI) * diameter/2) + diameter/3;
float d3 = 10 + (sin(angle) * diameter/2) + diameter/3;
ellipse(0, height/2, d1, d1);
ellipse(width/2, height/2, d2, d2);
ellipse(width, height/2, d3, d3);
angle += 0.009;
}