void drawstage() { //regardless of whether or not mouse pressed, draw the box in at every frame pushMatrix(); //1 fill(0.3);//was 0.03 translate(0, 200, 0); box(600, 1, 600); popMatrix(); //1 } void drawrotboxes(int _i) { int i= _i; //draw boxes and rotate them pushMatrix(); //1 rotateY(-float(trail[i][2])/1000); //if you comment this one out the boxes all draw in one plane, but the lines keep drawing through many planes //translate(trail[i][0], trail[i][1], 0); translate(trail[i][0], 199, 0);// this makes the cheese fall //translate(trail[i][0], 170, 0); //this does not work to put a second layer fill(100, 100, 0);//this fills in the EZ cheese- color changed to yellow box(8); popMatrix(); //1 } void drawrotshadows(int _i) { int i= _i; //make box shadows on the floor of the box as thick as boxes are and turn them pushMatrix(); rotateY(-float(trail[i][2])/1000);//set z translate(trail[i][0], 199, 0); fill(0); box(8, 1, 8);//this draws the shadows popMatrix(); } void drawrotlines(int _i) { int i= _i; //println(rotation); //println(-float(trail[i-1][2])/1000); //draw the lines connecting the boxes and rotate them pushMatrix(); stroke(1, 0.5); //define line color(?) and thickness(?) rotateY(-float(trail[i-1][2])/1000);//set z beginShape(LINES); vertex(trail[i-1][0], trail[i-1][1], 0); vertex(trail[i][0], trail[i][1], 0); endShape(); popMatrix(); } void drawrotlineshadows(int _i) { int i= _i; //draw the line shadows and rotate pushMatrix(); rotateY(-float(trail[i-1][2])/1000); //set z stroke(0); beginShape(LINES); // britta- play with this function. You can't do vertex, translate, and another vertex. Have to do an end shpae between the vetices if using translate. vertex(trail[i-1][0], 199, 0); vertex(trail[i][0], 199, 0); endShape(); popMatrix(); noStroke(); }