PImage icon; // storage for image void setup() { background(255); size(400, 400); icon = loadImage("tree.png"); for (int i = 1; i < 4; i++) { float scale = .5*i; drawTree(scale, i*icon.width, 200); } } // Draw the tree image scaled by an amount s // and placed so that its center is at x,y void drawTree(float s, int x, int y) { pushMatrix(); translate(x,y); scale(s,s); translate(-icon.width/2,-icon.height/2); image(icon, 0, 0); popMatrix(); }