float yTrans = -50; float xTrans = -550; float offset = -400; float zTrans = -250; float zoom = -50; float newX, newXmag = 0; PImage[] images = new PImage[35]; imageRow circle1, circle2, circle3; void setup() { size(800, 500, P3D); frameRate(30); noStroke(); colorMode(RGB); rectMode(CENTER); for(int i=1; i<10; i++) { String imageName = i + ".jpg"; images[i] = loadImage(imageName); } } void draw() { background(0,0,0); translate(xTrans, yTrans, zTrans); circle1 = new imageRow(0, 0, 1); translate(500, yTrans, 0); circle2 = new imageRow(100, 0, 4); translate(500, yTrans, 0); circle2 = new imageRow(200, 0, 7); if (zTrans > 3630) { zTrans = -270; xTrans = -340; } println(int(zTrans)); println(int(xTrans)); } void mouseDragged(){ noCursor(); if (mouseY-pmouseY < 0) { zTrans = zTrans + 10; } if (mouseY-pmouseY > 0) { zTrans = zTrans - 10; } if (mouseX-pmouseX < 0) { xTrans = xTrans - 5; } if (mouseX-pmouseX > 0) { xTrans = xTrans + 5; } } void mouseReleased() { cursor(); } class imageRow{ float initialX, Ytrans; int firstPic; imageRow(float x, float y, int n){ initialX = x; Ytrans = y; firstPic = n; //translate(x,y,0); for (int i=n; i < (n+3); i++) { image(images[i],width*.5,height*.5); translate(x, y, offset); } } }