// "AVIARY" - Daniel Sanchez // University of Oregon // ARTD 252: Prof. J. Park // April 27th, 2009 // Project no. 1 // // In this project I explored combining code previously finished by another author //with my own. Thanks to Kyle McDonald and his project called ‘MultiShadow Error,’ which is made //available at http://openprocessing.com/visuals/?visualID=1188, I was able to take inspiration from //his work and compose a new artistic and engaging piece. // // When I first saw his project, I was reminded of a childhood experience of watching //flocks of birds fly in between the tall buildings of downtown LA. So I toke his code and used //it as the matrix for my images of birds. I also incorporated a background image as well //as a sound clip, respectively called “Birds” by M83, to give the piece some context. // // After the first round of working on this project I felt like the piece was still very //static and needed a dynamic element and some color. So I inserted a piece of //code that allows the user to click on the screen, which engages some colored shapes into //the piece as well. // //Notes: Since most of my code has been embedded into the original code, you can find //Kyle’s original code on the separate tab in this file. // You can also find instructions and code for uploading music files in examples section //of the application folder. //Lastly, there are multiple variables in the code below. "i" represnts the variable for //the birds, whereas "n" represents the variable for the balls. //..............I HOPE YOU ENJOY THIS PIECE......................// //music section begin// import ddf.minim.*; AudioPlayer player; Minim minim; //music section end// //original code begin// float maxrots = .5; //changes the speed at which the birds travel int totLines = 50; Line[] lines = new Line[totLines]; //original code end// PImage b;//loads image of birds PImage d;//loads background image //below sets the ball array when the user clicks on the screen int bCount = 100;//sets no. of balls that will appear on the screen at once float [] yspd = new float[bCount]; float [] xspd = new float[bCount]; float [] xpos = new float[bCount]; float [] ypos = new float[bCount]; float [] bSize = new float[bCount]; float [] color1 = new float[bCount]; float gravity = 1; //.......................// void setup() { size(400,600,P3D); //Set size to size of background image colorMode(RGB,100); //make sure you have the correct color mode //orignal code begin// for(int i = 0; i < totLines; i++) lines[i] = randomLine(); camera(1, 0, (height