// Image3D - Based on Zoom by REAS // // Author: Jorge Cardoso // http://jorgecardoso.org // // 2 July 2005 /* A imagem a desenhar */ PImage a; /* Resolution of the image */ int res = 2; /* Current rotation angle */ float rotX = 0; float rotY = 0; /* Origin of the image on screen */ int originX; int originY; void setup() { size(400, 300, P3D); a = loadImage("arc.jpg"); /* calculate the origin of the image on the screen */ originX = a.width/2; originY = a.height/2; framerate(15); } void draw() { background(0); /* rotate around the center of the screen, a bit to the back */ translate(width/2, height/2, 0); rotateX(rotX); rotateY(rotY); /* draw the image as a set of 3d lines*/ float rr, gg, bb, tt; for(int i=0; i