> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://p5js.sketchpad.cc/sp/pad/view/ro.pfSjd5UQgmd/rev.498
 * 
 * authors: 
 *   Nicolas Di Costanzo

 * license (unless otherwise specified): 
 *   creative commons attribution-share alike 3.0 license.
 *   https://creativecommons.org/licenses/by-sa/3.0/ 
 */ 



var num=15;
function setup(){
    createCanvas(600,600);
    }
    function draw(){
        background('#9590A8');
        stroke('white');
        fill('grey');
     for(var i=0;i<num;i++){
var t = frameCount / 200.0*TWO_PI;
var angle = TWO_PI / num*i;
var d = map(sin(t+angle * 3),-1,1,100,200);   
var x = width / 2 + cos(angle)*d;
var y = height / 2 + sin(angle)*d;
var dd = 20;
var x2 = map(sin(t), -1, 1, width / 2 - dd, width / 2 + dd) + cos(angle) * 20;
var y2 = map(cos(t), -1, 1, width / 2 - dd, width / 2 + dd) + sin(angle) * 20;
var sz = map(sin(t + angle * 3), -1, 1, 25, 75);
var sz2 = map(sin(t + angle * 3), -1, 1, 0, sz * .9);
           line(x2,y2,x,y);
            noFill();
            ellipse(x=x,y=y,sz,sz);
            ellipse(x,y,sz2,sz2);
            fill('white');
            ellipse(x,y,5,5);
            }}