/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://studio.sketchpad.cc/sp/pad/view/ro.k$2jtSeu8Nq/rev.2172
*
* authors:
* Muriel Bruschet
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
void setup() {
size(300, 350);
smooth();
strokeWeight(1);
//noLoop();
}
void draw() {
background(50, 150, 200);
for (i=0; i<360; i++){
float r = random (110, 140);
stroke(255,155,0);
line(width/2, height/2, width/2+cos(i)*r, height/2+sin(i)*r);
}
loadPixels();
for (int j = height/2-100; j < height/2+100; j++) {
for (int i = width/2-100; i < width/2+100; i++) {
int dc = dist(i, j, width/2, height/2);
if (dc<=100)
pixels[j*width+i] = color(255, 255-dc, 255-dc*2);
}
}
updatePixels();
}