/* Bratienberg V_4 Make vehicles also be sources, so that vehicles respond to each other. Each vehicle is attracted to the other vehicles based on proximity. If a vehicle is within 300 px of another one, its sensors will detect the other vehicle and speed up the angular velocity. The closer the vehicle, the greater the change. By Aaron Levisohn */ // Processing source code : Braitenberg's Vehicles // Based on program written by william ngan boolean halo = false; //turn on the identification halos for the robots myVehicle[] robots; boolean mouseDown; boolean bounded = false; // vehicles run into world boundary (if true), wrap around (if false) int numOfRobots = 7; //starting number of robots int numOfLights = 1; float move_speed = PI/6; int totalRobots = 30; //max number of robots void setup() { size( 800, 600 ); frameRate( 30 ); ellipseMode( CENTER ); rectMode( CENTER ); noStroke(); robots = new myVehicle[totalRobots]; for (int i=0; i