Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PImage img;
- int step=3;
- float theta;
- void setup() {
- img = loadImage("http://i.imgur.com/rVnFQo3.jpg");
- size(img.width, img.height);
- println(width, height);
- }
- void draw() {
- image(img, 0, 0);
- step = (int) random(1, 8);
- for (int y=0; y<height/2; y+=step) {
- int mx = (int) random(width/5);
- copy(img, 0, y, width-mx, step, mx, y, width-mx, step);
- copy(img, width-mx, y, width, step, 0, y, mx, step);
- }
- //if (frameCount<18) saveFrame("image-###.gif");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement