Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- color bg = #361826;
- color s = #ffffff;
- float x1, x2, x3, y1, y2, y3, theta;
- void setup() {
- size(500, 500);
- background(bg);
- noFill();
- }
- void draw() {
- background(bg);
- stroke(s,200);
- for (int i=0; i<20; i++) {
- strokeWeight(1);
- beginShape();
- vertex(0, i*20); // first point
- x2 = map(sin(theta), -1, 1, 180+i*8, 250+i*6);
- y2 = map(sin(theta), -1, 1, 150, 300);
- x1 = x2*0.5;
- y1 = (x2+y2)-x1;
- x3 = x2*1.7;
- y3 = (x2+y2)-x3;
- bezierVertex(209, -3, x1, y1, x2, y2);
- bezierVertex(x3, y3, 444, 419, 500-i*20, 500);
- endShape();
- }
- theta += 0.0523;
- if (frameCount % 5 == 0 && frameCount<121) saveFrame("image-####.gif");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement