}
/////////////////////////////////////////////////////
class Ball {
PVector a;
// ball constructor
Ball(float _x, float _y,float _z) {
a = new PVector(_x,_y,_z);
float x,y,z;
x = _x;
y = _y;
z = _z;
}
// ball functions
void update() {
a = new PVector();
for (int i = 0; i < attractor.length; i++) {
a.add(attractor[i].getAccel(a.x,a.y,a.z));
// a = new PVector();
// for (int k = 0; k < attractor.length; i++) {
//a.add(attractor[k].getAccel(x,y,z));
// }
}
}
}
class Attractor {
float x,y,z;
Attractor(float _x, float _y, float _z ) {
x = _x;
y = _y;
z = _z;
}