void setup(){ smooth(); size(600,600, P3D); } void draw(){ } void mousePressed() { background(0); for(int i=0; i<10; i++) { PImage b; int rimgnum = ceil(random(9)); b = loadImage("field"+rimgnum+".jpg"); int x1 = ceil(random(width)); int x2 = ceil(random(width)); // int x3 = ceil(random(width)); // int x4 = ceil(random(width)); int y1 = ceil(random(height)); int y2 = ceil(random(height)); // int y3 = ceil(random(height)); // int y4 = ceil(random(height)); stroke(100); textureMode(NORMALIZED); beginShape(); // quad(x1, y1, x2, y2, x3, y3, x4, y4); texture(b); vertex(x1, y1,-20, 0,0); vertex(x2, y1,-20, 0,1); vertex(x2, y2,-200, 1,1); vertex(x1, y2,-200, 1,0); endShape(); //println ("HELLO: "+rimgnum); } }