Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PImage img;
- void setup() {
- 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");
- img.loadPixels();
- size(600, 900);
- img.resize(width, height);
- //background(img);
- noStroke();
- }
- int x = width/2;
- int y = height/2;
- int x2, y2;
- void draw() {
- //pointalize
- for (int i=0; i<10; i++) {
- x=(int)random(width);
- y=(int)random(height);
- fill(img.pixels[y*width+x]);
- ellipse(x, y, 30*mouseX/width, 30*mouseX/width);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement