private static Point findMidnormalPoint(Point center,Point a,Point b,Rect area,int radius){
  if (a.y == b.y) {
    if (a.y < center.y) {
      return new Point((a.x + b.x) / 2,center.y + radius);
    }
    return new Point((a.x + b.x) / 2,center.y - radius);
  }
  if (a.x == b.x) {
    if (a.x < center.x) {
      return new Point(center.x + radius,(a.y + b.y) / 2);
    }
    return new Point(center.x - radius,(a.y + b.y) / 2);
  }
  double abSlope=(a.y - b.y) / (a.x - b.x * 1.0);
  double midnormalSlope=-1.0 / abSlope;
  double radian=Math.tan(midnormalSlope);
  int dy=(int)(radius * Math.sin(radian));
  int dx=(int)(radius * Math.cos(radian));
  Point point=new Point(center.x + dx,center.y + dy);
  if (!inArea(point,area,0)) {
    point=new Point(center.x - dx,center.y - dy);
  }
  return point;
}

private static Point findMidnormalPoint ( Point center , Point a , Point b , Rect area , int radius ) { if ( a . y == b . y ) { if ( a . y < center . y ) { return new Point ( ( a . x + b . x ) / 2 , center . y + radius ) ; } return new Point ( ( a . x + b . x ) / 2 , center . y - radius ) ; } if ( a . x == b . x ) { if ( a . x < center . x ) { return new Point ( center . x + radius , ( a . y + b . y ) / 2 ) ; } return new Point ( center . x - radius , ( a . y + b . y ) / 2 ) ; } double abSlope = ( a . y - b . y ) / ( a . x - b . x * 1.0 ) ; double midnormalSlope = - 1.0 / abSlope ; double radian = Math . tan ( midnormalSlope ) ; int dy = ( int ) ( radius * Math . sin ( radian ) ) ; int dx = ( int ) ( radius * Math . cos ( radian ) ) ; Point point = new Point ( center . x + dx , center . y + dy ) ; if ( ! inArea ( point , area , 0 ) ) { point = new Point ( center . x - dx , center . y - dy ) ; } return point ; }
find the middle point of two intersect points in circle , only one point will be correct
