/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://studio.sketchpad.cc/sp/pad/view/ro.$N11oui$Yyj/rev.815
*
* authors:
* Eric Fickes
* 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, maxI = 0;
float radius, xx, yy, startX, startY, centerX, centerY;
float angle = 0;
float alf = 50;
///////////////////////////////////////////////////////////////////////////
//
void setup() { // this is run once.
// set the background color
background(255);
// canvas size (Variable aren't evaluated. Integers only, please.)
size(666, 666);
// smooth edges
smooth();
noFill();
centerX = width/2;
centerY = height/2;
// set the width of the line.
strokeWeight(1);
maxI = width+height;
startX = centerX;
startY = centerY;
radius = floor(alf/2);
}
///////////////////////////////////////////////////////////////////////////
//
void draw() { // this is run repeatedly.
xx = startX - int( cos(radians(angle)) * radius );
yy = startY - int( sin(radians(angle)) * radius );
noFill();
if( i % alf == 0 ) {
strokeWeight( alf );
stroke(255, 222);
point( xx, yy );
strokeWeight( alf );
stroke(#EF0000, 150);
} else {
noFill();
strokeWeight( random(.5, 1.1) );
stroke(0, alf );
}
ellipse( xx, yy, radius, radius );
angle += alf;
i++;
if( i > maxI ) {
text("DONE SON!", width - 100, height - 20 );
noLoop();
}
if( i % alf == 0 ) {
radius += alf;//*.75;
}
}