Advertisement
xeromino

drip

Apr 24th, 2014
690
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1. PImage img;
  2.  
  3. void setup() {
  4.   img = loadImage("image.jpg");
  5.   size(img.width, img.height);
  6.   image(img, 0, 0);
  7. }
  8.  
  9. void draw() {
  10.  
  11.   int x = (int)random(width);
  12.   int y = (int)random(height);
  13.   float a = random(100, 200);
  14.   fill(img.get(x, y), a);
  15.   noStroke();
  16.   float w = random(1, 10);
  17.   float h = random(5, 100);
  18.   rect(x, y, w, h);
  19. }
  20.  
  21. void keyPressed() {
  22.   saveFrame("image-####.jpg");
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement