> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://studio.sketchpad.cc/sp/pad/view/ro.vWr2DgIyi3M/rev.226
 * 
 * authors: 
 *   Sina Seifee

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



void setup() {  
  size(400, 400);  
  background(165);    
  stroke(0, 0, 0, 255)  
  strokeWeight(0.5);  
  initX=width/2;
  initY=height/2;
  noFill();
  smooth();
}  

int initX, initY;
int rad=width*2;

void draw(){
    int res=10;
    int circle=360;
    float cRadX, cRadY, cX, cY;
    float x, y;
    float a = 0.0;
    float inc = TWO_PI/(res*2);
    background(165);
    ellipse(initX, initY, width, height);
    for(int i=0; i<res; i+=180/circle) {
        x=initX+sin(a)*rad;
        y=initY+cos(a)*rad;
        line(mouseX, mouseY, x, y);
        cRadX=i*(rad/res)*1.5;
        cX=mouseX+((initX-mouseX)/2.1)*i;
        cY=mouseY+((initY-mouseY)/2.1)*i;
        cRadY=cRadX;
        ellipse(cX, cY, cRadX, cRadY);
        a += inc;
        ellipse(initX, initY, width-mouseX-i*50, height-mouseY-i*50);
    }
}