> show canvas only <


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

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



// Pressing Control-R will render this sketch.

int i = 0; 
int x = 100;  
int y = 125;  

float px = 0, py = 0, angle = 0;  
float pts = 36;  
float rot = 360.0/pts; 


void setup() {  // this is run once.   
    
    // set the background color
    background(255);
    
    // specify canvas size
    size(600, 250); 
      
    // smooth edges
    smooth();
    
    // limit the number of frames per second
    frameRate(5);
    
    // set the width of the line. 
    strokeWeight(0.5);

} 

void draw() {  // this is run repeatedly.  

j = random (100)+5;   

int outerRad = random (300);  
int innerRad = random (150);  

int col = random (175,255);

fill(col, col, col, 5);
//fill(255,255,255, 1);

stroke(col-50, col-50, col-50, 100);
beginShape(TRIANGLE_STRIP);   
for (int i=0; i<pts; i++) {  
  px = x+cos(radians(angle))*outerRad;  
  py = y+sin(radians(angle))*outerRad;  
  angle+=rot*j;  
  vertex(px, py);  
  px = x+cos(radians(angle))*innerRad;  
  py = y+sin(radians(angle))*innerRad;  
  vertex(px, py);   
  angle+=rot*j;  
}  
endShape(); 


}