Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float y, theta, rad;
- int num = 30;
- color bg= #000000;
- void setup() {
- size(500, 300);
- background(bg);
- noFill();
- theta=0;
- }
- void draw() {
- background(0);
- for (int i=0; i < num; i++) {
- strokeWeight(random(20, 40));
- rad = random(50, 60);
- stroke((255/num)*i, 200);
- float starty = height/2 + random(-10, 10);
- beginShape();
- for (int x=int(random(-3,3)); x< width; x++) {
- y = starty+ (pow(sin(theta), 3)*rad);
- curveVertex(x, y);
- theta += .03;
- }
- endShape();
- }
- if (frameCount > 100) saveFrame("line-###.gif");
- }
- void mouseClicked() {
- save(random(123) + ".jpg");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement