Advertisement
Guest User

Untitled

a guest
Mar 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. PImage img;
  2.  
  3. void setup() {
  4. img = loadImage("https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg/800px-Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg");
  5. img.loadPixels();
  6. size(600, 900);
  7. img.resize(width, height);
  8. //background(img);
  9. noStroke();
  10. }
  11.  
  12. int x = width/2;
  13. int y = height/2;
  14. int x2, y2;
  15. void draw() {
  16.  
  17. //pointalize
  18. for (int i=0; i<10; i++) {
  19. x=(int)random(width);
  20. y=(int)random(height);
  21. fill(img.pixels[y*width+x]);
  22. ellipse(x, y, 30*mouseX/width, 30*mouseX/width);
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement