// move the mouse to rotate, press key to zoom PImage ourTexture; float zoom = 1; void setup() { size(500, 500, P3D); ourTexture = loadImage("http://www.atkielski.com/framethisplease/PhotoGallery/Paris/Eiffel/images/EiffelTowerSmall.jpg"); ourTexture.resize(width, height); } void draw() { background(0); if (keyPressed == true) zoom = mouseX-300; // press key to change zoom translate(width/2, height/2, zoom); // to make sure all rotations are centered around the center of our window, and move away from the object by "zoom" rotateX(mouseY/100.0); // rotate around the X and Y axis (divide by 100 to make a small number as it expects radians) rotateY( mouseX/100.0); beginShape(); // start a new shape, texture(ourTexture); vertex(-100, -100, 0, 0, 0); // define the three corners of our face vertex( -100, 100, 0, 0, height); // the last 2 numbers are the X,Y placement of the texture for that vertex vertex( 100, 100, 0, width, height); endShape(); // done with the shape }