> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://studio.sketchpad.cc/sp/pad/view/ro.fYfENLQLTyn/rev.17
 * 
 * authors: 
 *   Visa-Valtteri Pimiä

 * 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 created by Visa-Valtteri Pimi&#228;
// http://studio.sketchpad.cc/sp/pad/view/ro.9Uu$nILr6sluj/rev.106

PImage fb;

float timer = 0;

void setup() {
  size(600, 320);
  smooth();
  frameRate(60);
  strokeWeight(8);
  background(0,0,0);
  fb = get();
}

void draw() {
  timer = millis()*0.001; 
  pushMatrix();
  translate(width/2,height/2);
  rotate(timer*0.1);
  scale(0.95);
  translate(-width/2,-height/2);
  image(fb,0,0);
  popMatrix();
  
  float cirs1 = width/8+sin(timer)*width/8;
  float cirs2 = width/8+cos(timer)*width/8;
  float cirs3 = width/8+cos(timer)*width/8;
  float cirs4 = width/8+sin(timer)*width/8;
  
  color c1 = color(192,128+cos(timer)*92, 64, 192);
  color c2 = color(64,192,128+sin(timer)*92, 160);
  color c3 = color(90,64,150,128+cos(timer)*92);
  color c4 = color(80,128+sin(timer)*92, 180, 192);

  
  noFill();
  stroke(c1);
  ellipse(width/2-cirs1/2,height/2-cirs1/2,cirs1,cirs1);
  stroke(c2);
  ellipse(width/2+cirs2/2,height/2-cirs2/2,cirs2,cirs2);
  stroke(c3);
  ellipse(width/2-cirs3/2,height/2+cirs3/2,cirs3,cirs3);
  stroke(c4);
  ellipse(width/2+cirs4/2,height/2+cirs4/2,cirs4,cirs4);
  fb = get();
}