Advertisement
xeromino

impact

Dec 20th, 2016
176
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void setup() {
  2.   size(1080, 720);
  3.   background(0);
  4. }
  5.  
  6. void draw() {
  7.   stroke(255, 10);
  8.   for (int i=0; i<10; i++) {
  9.     float a = randomGaussian() * TWO_PI;
  10.     float d = randomGaussian() * 200;
  11.     float x = width + 200 + cos(a)*d;
  12.     float y = 150 + sin(a)*d;
  13.     pushMatrix();
  14.     translate(x, y);
  15.     rotate(90);
  16.     line(0, 0, 700, 700);
  17.     popMatrix();
  18.   }
  19. }
  20.  
  21. void keyPressed() {
  22.   saveFrame("image-###.png");
  23. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement