PImage img; void setup(){ size(400,300); img = loadImage("tvland.png"); imageMode(CENTER); } float s = 1.5; //float f = 0.0; void draw(){ background(0); drawZoom(s); s += map( mouseY,0,height,.1,-.1 ); if(s < 1.0) { s = 1.666666; } if(s > 1.66666666) { s = 1.0; } } void drawZoom(float startscale){ float scale = startscale; float w=width*scale; float h=height*scale; while(w > 1.0){ w = width * scale; h = height * scale; drawAt(w,h); scale *= .6; } } void drawAt(float w, float h){ image(img,200,150,w,h); }