/* size(400,400); BImage b; // you can load jpg or gif images - gif will show alpha channel if it has one embedded b = loadImage("window.jpg"); image(b, 0, 0); */ BImage b; int sizex = 400; int sizey = 400; void setup() { size(sizex,sizey); background(0); } void loop() { b = loadImage("window.jpg"); // this translate statement is key because it finds the midpoint of the window // if we didn't do this, then the images would rotate about the upper left corner of the screen, not the middle! // for more reference, check out this page and scroll down until you see the "Ratation" heading: // http://stage.itp.nyu.edu/%7Edts204/ppaint/week3/index.html translate (sizex/2, sizey/2); tint (200, 200, 255); push(); twirl_image( 20, b, -100, 0, 300, 8); pop(); tint (200, 255, 200); twirl_image( 20, b, -50, 0, 40, 20); } // by using the following method: // void function_name ( datatype variablename, etc..) // { statements } // ...you can easily trigger a complex event from the main body of your program multiple times void twirl_image ( int num, BImage img, int xloc, int yloc, int imgsize, int rot) { int i=0; while (i