xxxxxxxxxx
// setting up an array of paths using the class pathfinder (other tab)
pathfinder[] paths;
void setup() {
// size(800, 600);
fullScreen(); //just makes the sketch full screen, you can also just use size to make a smaller sketch
background(0);
stroke(0, random (255), random(127)); // a random color every time it's run because its pretty
noFill();
smooth();
//initialising the array of paths
paths = new pathfinder[1];
paths[0] = new pathfinder();
}
void draw() {
for (int i=0;i<paths.length;i++) {
PVector loc = paths[i].location;
float diam = paths[i].diameter;
ellipse(loc.x, loc.y, diam, diam);
paths[i].update();
}
}
void mousePressed() {
background(0);
paths = new pathfinder[1];
paths[0] = new pathfinder();
}