/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://studio.sketchpad.cc/sp/pad/view/ro.RIS3E8i2c6x/rev.1124
*
* authors:
* Matt Perkins
* 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.
// happy mother's day!
int i = 0;
int width4 = 0;
int height4 = 0;
int width2 = 0;
int height2 = 0;
void setup() { // this is run once.
// set the background color
background(255);
// canvas size (Variable aren't evaluated. Integers only, please.)
size(720, 720);
// smooth edges
smooth();
// limit the number of frames per second
frameRate(30);
//sometimes i like to calc some values ahead of time
//just to save a few cycles (life is short amirite!)
width4 = width/4;
height4 = height/4;
width2 = width/2;
height2 = height/2;
// set the width of the line.
strokeWeight(35);
}
void draw() { // this is run repeatedly.
//we're going to take advantage of some matrice fun
//here to spread lines of petals out in a nice
//360 degree spread over 360 steps.
translate(width2, height2);
rotate((random(1,360)/360) * TWO_PI);
// set the color to a yellowish with some random-ness
stroke(200+random(55), 200 + random(55), 245 + random(10), 35);
//draw the line with the
line(70, 70, random(30) + width4, random(30) + height4);
//then we're going to draw some dots in that same
//way taking advantage of the rotation to spread
//our our dots in a nice circular fashion.
stroke(0, 0, 0, 23);
fill( 235 + random(20), random(150), 150, 135);
for(int j = 0; j < 15 ;j++)
{
int dotwidth = random(10);
ellipse(random(70), random(70), dotwidth, dotwidth);
}
// move over a pixel
if (i < width) {
i++;
} else {
i = 0;
}
}