Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PImage img;
- int counter;
- int scal = 10;
- float noiseVal;
- void setup() {
- img = loadImage("http://media-cache-ak0.pinimg.com/736x/8f/16/7a/8f167a7272c88412a7c9b5ee00fd8ae7.jpg");
- size(500, img.height);
- //image(img, 0, 0);
- frameRate(5);
- noiseVal = random(100);
- }
- void draw() {
- background(0);
- int step = int(random(1*scal, 2*scal));
- for (int y=0; y<height; y+=step) {
- //int x = int(random(-1, 1)*20);
- int x = (int) (noise(noiseVal)*width/2);
- noiseVal += 0.01;
- println();
- copy(img, 0, y, width, step, x, y, width+x, step);
- copy(img, width-x, y, x, step, 0, y, x, step);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment