//ran tao //nature of code //week 2 //9.25.06 //adapted from dan shiffman's code //Choose one of the following (or create your own). Post links to results here. // 1) If you worked on a random walker assignment from last week, redo it using vectors // 2) Extend one of the examples into 3 dimensions. // 3) Apply the concepts of velocity and acceleration to something other than the usual 2D motion. // 4) Using a single primitive shape only (square, ellipse, etc.), // create a ÒpersonalityÓ for your object by affecting its velocity & acceleration. // Can you make it appear to be ÒaliveÓ and/or have intelligence? Can it interact with the mouse? // 5) Extend one of the above examples to include multiple objects using an array or ArrayList. // Can these objects interact with each other somehow? import noc.*; // Declare the squares Squares[] mySquares = new Squares[300]; void setup() { size(200,600); background(255); framerate(30); smooth(); reset(); } // Create the Squares object void reset() { for (int i= 0; i < mySquares.length; i++) { Vector3D v = new Vector3D(1.3,0.125, 0.6); Vector3D a = new Vector3D(0.00,0.00); Vector3D l = new Vector3D(random(width),random(height)); mySquares[i] = new Squares(a,v,l); } } void draw() { background(255); // Run the Squares object for (int i=0; i