Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PImage img;
- void setup() {
- img = loadImage("http://media-cache-ak0.pinimg.com/736x/2c/f6/a5/2cf6a58f75b368949cf98db03b925f1b.jpg");
- size(img.width, img.height);
- image(img, 0, 0, width, height);
- }
- void draw() {
- }
- void mouseReleased() {
- int num = (int) random(10, 50);
- for (int i=-num/2; i<1+num/2; i++) {
- float x = mouseX-i;
- float y = mouseY;
- color col = img.get(int(x), int(y));
- stroke(col, 150);
- line(x, y, x, y+int(random(100, 200)));
- }
- }
- void keyPressed() {
- save(random(34344)+".jpg");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement