/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://studio.sketchpad.cc/sp/pad/view/ro.hNSdLiwe$w1/rev.1025
*
* authors:
* hasanein
* 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 j = 0;
boolean set = true;
int angle = 15;
void setup() { // this is run once.
// set the background color
background(0);
// canvas size (Variable aren't evaluated. Integers only, please.)
size(300, 300);
// smooth edges
smooth();
// limit the number of frames per second
frameRate(700);
// set the width of the line.
strokeWeight(2);
}
void draw() { // this is run repeatedly.
// set the color
stroke(random(255), random(255), random(255), random(255));
//stroke(255, 255, 255, 255);
// Draw a line with some slop
for(int x = 0 ; x < 500 ; x++)
{
line(i, 0, i, height);
translate(i, 0);
rotate(radians(angle));
}
if(angle == 360)
{
angle = 15;
}
else
{
angle *= 2;
}
// move over a pixel
if (i == width)
{
i = 0;
}
else
{
i += 10;
}
}