static void calCenter(CirclesAndLines cal) { if (n == 0) ret; double x = 0, y = 0; int n = l(cal.circles); for (Circle c : cal.circles) { x += c.x; y += c.y; } calTranslate(cal, 0.5-x/n, 0.5-y/n); }