Layer la = layerset.getLayer(z, thickness, true); // created new if not there already
// Insert the individual ball
double x = data[i][0];
double y = data[i][1];
double r = data[i][3];
ball.addBall(x, y, r, la.getId()); // no Z, but Layer id!
}
// After a repaint, Ball balls will be made local to the bounding box of all of them
ball.repaint(true);
return ball;