/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://studio.sketchpad.cc/sp/pad/view/ro.gyEN2aaD5p6/rev.227
*
* authors:
* abethree
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
void setup(){
size(500,500);
colorMode(RGB);
background(245);
strokeWeight(5);
frameRate( 1 );
smooth();
}
void draw(){
background(245);
float radius = 10;
int centX = 250;
int centY = 250;
stroke(0, 30);
fill(255);
ellipse(centX,centY,radius*40,radius*40);
stroke(20, 50, 70);
float x, y;
float lastx=0;
float lasty=0;
float radiusNoise= random(10);
for (float ang=0; ang<=1440; ang+=5){
radius+=0.5;
radiusNoise+=0.3;
float thisRadius= radius+(noise(radiusNoise)*200)-100;
float rad=radians(ang);
x = centX + (thisRadius * cos(rad));
y = centY + (thisRadius * sin(rad));
if (lastx>0){
line(x,y,lastx,lasty);
}
lastx=x;
lasty=y;
}
}