private static double workoutY1(double x, double y, int i, int allnum) {
   if (x != Ox) {
     double tana = (y - Oy) / (x - Ox) * R / r;
     alpha = Math.atan(tana);
     if (x <= Ox) alpha = alpha + Math.PI;
   } else alpha = Math.PI / 2;
   return (r * Math.sin(alpha - 2 * Math.PI * i / (allnum)) + Oy);
 }
 private static double workoutX(double x, double y, int i, int allnum) {
   if (x != Ox) {
     double tana = (y - Oy) / (x - Ox) * R / r;
     alpha = Math.atan(tana);
     if (x <= Ox) alpha = alpha + Math.PI;
   } else alpha = Math.PI / 2;
   return (R * Math.cos(alpha - 2 * Math.PI * i / (allnum) + theta - beta) + Ox);
 }