Advertisement
xeromino

Curtain

Oct 22nd, 2013
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.83 KB | None | 0 0
  1. void setup() {
  2.   size(500, 800);
  3.   background(#542437);
  4.  
  5.   for (int x=-10; x < width; x +=8) {
  6.     drawStrull(x);
  7.   }
  8. }
  9.  
  10. void draw() {
  11. }
  12.  
  13. void drawStrull(int _x) {
  14.   float x = _x;
  15.   float marge = 20;
  16.   float marge_y = 10;
  17.   fill(#C02942, 150 + random(50));  
  18.   stroke(#542437, 120);
  19.   beginShape();
  20.   curveVertex(x, 0);
  21.   curveVertex(x + random(marge/2), 0);
  22.   curveVertex(x + random(marge/2), 200+random(marge_y));
  23.   curveVertex(x + random(marge/2), 400+random(marge_y));
  24.   curveVertex(x + random(marge/2), height*.65);
  25.  
  26.   curveVertex(x + random(marge, 2*marge), height*.65);
  27.   curveVertex(x + random(marge, 2*marge), 450+random(marge_y));
  28.   curveVertex(x + random(marge, 2*marge), 150+random(marge_y));
  29.   curveVertex(x + random(marge, 2*marge), 0);
  30.   curveVertex(x + random(marge, 2*marge), 0);
  31.   endShape(CLOSE);
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement