int xpix; int ypix; color b; double n,n2,n3; double angle = 8*Math.PI/200; color pixArray[][]=new color[1000][1000]; BImage a; float r = 10; float count; float inc = .001; int Delay = 5 ; int xpos; int ypos; int newxpos; float angleAxis; boolean showImage = false; float valueModifier = 1; void setup() { size(640, 420); a = loadImage("holbein.jpg"); xpix = int(a.width); ypix = int(a.height); angleAxis = TWO_PI/ ( (width*width) / (1000) ); } void loop() { background(0,0,0); if (showImage) { imageMode(CORNER); //image(a, 5, 120); //valueModifier = 10; } translate((width-a.width)/2,(height-a.height)/2,0); //rotateX(TWO_PI/width/2 * mouseY); //rotateX(TWO_PI/width*200); //rotateY(TWO_PI/height * mouseX); count+=inc; if (count>100) { //inc = -1; } float diff = xpos-mouseX; if (abs(diff) > 0.01f) { xpos -= diff/Delay; } diff = ypos-mouseY; if (abs(diff) > 0.01f) { ypos -= diff/Delay; } // rotates the whole image //rotateY(angleAxis * xpos); rotateX(1.2 * PI / height * xpos); valueModifier = width/(ypos+.01); for (int i=0; i