// Path Following // Daniel Shiffman // The Nature of Code, Spring 2009 // Via Reynolds: // http://www.red3d.com/cwr/steer/PathFollow.html // Using this variable to decide whether to draw all the stuff //boolean debug = true; boolean debug = false; PFont f; // A path object (series of connected points) Path path; // Two boids //Boid boid0; //Boid boid1; // Array of boids Boid [] boids = new Boid [100]; void setup() { //Each client is 2720x768 making a total resolution of 8160x768. //size(640,320); size(1280,361); //1280x800 display: 1 client //size(1280,120); //1280x800 display: 3 clients //frameRate(5); smooth(); f = createFont("Georgia",12,true); // Call a function to generate new Path object newPath(); //Each boid has different maxspeed and maxforce for demo purposes //boid0 = new Boid(new PVector(0,height/2),3,0.1); //boid1 = new Boid(new PVector(0,height/2),5,0.1); for (int i=0; i